diff options
| author | Mark Freeman <mark@golang.org> | 2025-05-29 16:06:27 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-06-02 11:58:30 -0700 |
| commit | 25ca686a0bef5da90367964236fec49ce45626e3 (patch) | |
| tree | a23f80e3d6dbec9c50db0495fcefd5dad75e0981 | |
| parent | 11660d537b3387ba380f3bc2e85b9b59dac0dff5 (diff) | |
| download | go-25ca686a0bef5da90367964236fec49ce45626e3.tar.xz | |
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>
| -rw-r--r-- | src/cmd/compile/internal/noder/doc.go | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/noder/doc.go b/src/cmd/compile/internal/noder/doc.go index 05fcddadc5..142f40c28a 100644 --- a/src/cmd/compile/internal/noder/doc.go +++ b/src/cmd/compile/internal/noder/doc.go @@ -27,7 +27,7 @@ determines its index in the series. SectionPkg SectionName SectionType // TODO(markfreeman) Define. - SectionObj // TODO(markfreeman) Define. + SectionObj SectionObjExt // TODO(markfreeman) Define. SectionObjDict // TODO(markfreeman) Define. SectionBody // TODO(markfreeman) Define. @@ -159,6 +159,23 @@ for objects. 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 A reference table precedes every element. Each entry in the table contains a (section, index) pair denoting the location of the |
