mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile/internal/noder: fill in SectionName
Change-Id: Ib99d40a546cb095c1b6c2d33e0735f3b5c681539 Reviewed-on: https://go-review.googlesource.com/c/go/+/677237 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:
parent
711ff943af
commit
11660d537b
1 changed files with 28 additions and 4 deletions
|
|
@ -25,7 +25,7 @@ determines its index in the series.
|
||||||
SectionMeta
|
SectionMeta
|
||||||
SectionPosBase
|
SectionPosBase
|
||||||
SectionPkg
|
SectionPkg
|
||||||
SectionName // TODO(markfreeman) Define.
|
SectionName
|
||||||
SectionType // TODO(markfreeman) Define.
|
SectionType // TODO(markfreeman) Define.
|
||||||
SectionObj // TODO(markfreeman) Define.
|
SectionObj // TODO(markfreeman) Define.
|
||||||
SectionObjExt // TODO(markfreeman) Define.
|
SectionObjExt // TODO(markfreeman) Define.
|
||||||
|
|
@ -35,9 +35,11 @@ determines its index in the series.
|
||||||
|
|
||||||
# Sections
|
# Sections
|
||||||
A section is a series of elements of a type determined by the section's
|
A section is a series of elements of a type determined by the section's
|
||||||
kind. Go constructs are mapped onto (potentially multiple) elements.
|
kind. Go constructs are mapped onto one or more elements with possibly
|
||||||
Elements are accessed using an index relative to the start of the
|
different types; in that case, the elements are in different sections.
|
||||||
section.
|
|
||||||
|
Elements are accessed using an element index relative to the start of
|
||||||
|
the section.
|
||||||
|
|
||||||
RelElemIdx = Uint64 .
|
RelElemIdx = Uint64 .
|
||||||
|
|
||||||
|
|
@ -135,6 +137,28 @@ Note, a PkgRef is *not* equivalent to Ref[Pkg] due to an extra marker.
|
||||||
Ref[Pkg]
|
Ref[Pkg]
|
||||||
.
|
.
|
||||||
|
|
||||||
|
## Object Sections
|
||||||
|
Information about an object (e.g. variable, function, type name, etc.)
|
||||||
|
is split into multiple elements in different sections. Those elements
|
||||||
|
have the same section-relative element index.
|
||||||
|
|
||||||
|
### Name Section
|
||||||
|
The name section holds a series of names.
|
||||||
|
|
||||||
|
SectionName = { Name } .
|
||||||
|
|
||||||
|
Names are elements holding qualified identifiers and type information
|
||||||
|
for objects.
|
||||||
|
|
||||||
|
Name = RefTable
|
||||||
|
[ Sync ]
|
||||||
|
[ Sync ]
|
||||||
|
PkgRef // the object's package
|
||||||
|
StringRef // the object's package-local name
|
||||||
|
[ Sync ]
|
||||||
|
Uint64 // the object's type (e.g. Var, Func, etc.)
|
||||||
|
.
|
||||||
|
|
||||||
# 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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue