cmd/compile/internal/noder: begin filling in SectionObj

SectionObj has to encode the definition information for each object
type, so it will be a bit long.

Change-Id: I9b9514d58a284a4e64020f99fd1b2a92f7752338
Reviewed-on: https://go-review.googlesource.com/c/go/+/677377
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Mark Freeman <mark@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
Mark Freeman 2025-05-29 16:06:27 -04:00 committed by Gopher Robot
parent 11660d537b
commit 25ca686a0b

View file

@ -27,7 +27,7 @@ determines its index in the series.
SectionPkg SectionPkg
SectionName SectionName
SectionType // TODO(markfreeman) Define. SectionType // TODO(markfreeman) Define.
SectionObj // TODO(markfreeman) Define. SectionObj
SectionObjExt // TODO(markfreeman) Define. SectionObjExt // TODO(markfreeman) Define.
SectionObjDict // TODO(markfreeman) Define. SectionObjDict // TODO(markfreeman) Define.
SectionBody // TODO(markfreeman) Define. SectionBody // TODO(markfreeman) Define.
@ -159,6 +159,23 @@ for objects.
Uint64 // the object's type (e.g. Var, Func, etc.) Uint64 // the object's type (e.g. Var, Func, etc.)
. .
### Definition Section
The definition section holds definitions for objects defined by the
target package; it does not contain definitions for imported objects.
SectionObj = { ObjectDef } .
Object definitions can be one of several formats. To determine the
correct format, the name section must be referenced for the object's
type.
ObjectDef = ObjectDefConst // TODO(markfreeman) Define.
| ObjectDefFunc // TODO(markfreeman) Define.
| ObjectDefAlias // TODO(markfreeman) Define.
| ObjectDefNamedType // TODO(markfreeman) Define.
| ObjectDefVar // TODO(markfreeman) Define.
.
# References # References
A reference table precedes every element. Each entry in the table A reference table precedes every element. Each entry in the table
contains a (section, index) pair denoting the location of the contains a (section, index) pair denoting the location of the