From: Mark Freeman Date: Thu, 29 May 2025 20:06:27 +0000 (-0400) Subject: cmd/compile/internal/noder: begin filling in SectionObj X-Git-Tag: go1.25rc1~23 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=25ca686a0bef5da90367964236fec49ce45626e3;p=gostls13.git 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 Auto-Submit: Mark Freeman LUCI-TryBot-Result: Go LUCI --- 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