mirror of
https://github.com/golang/go
synced 2024-11-18 14:54:40 -07:00
runtime: document implicit fields at the end of _func
Currently these are only implicitly documented by the code that generates and consumes them. Add explicit documentation. Change-Id: I25a1294f04dc11785242643bec83370c66ff7a20 Reviewed-on: https://go-review.googlesource.com/c/go/+/427954 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Michael Pratt <mpratt@google.com>
This commit is contained in:
parent
d1681120be
commit
e406112011
@ -873,6 +873,28 @@ type _func struct {
|
||||
flag funcFlag
|
||||
_ [1]byte // pad
|
||||
nfuncdata uint8 // must be last, must end on a uint32-aligned boundary
|
||||
|
||||
// The end of the struct is followed immediately by two variable-length
|
||||
// arrays that reference the pcdata and funcdata locations for this
|
||||
// function.
|
||||
|
||||
// pcdata contains the offset into moduledata.pctab for the start of
|
||||
// that index's table. e.g.,
|
||||
// &moduledata.pctab[_func.pcdata[_PCDATA_UnsafePoint]] is the start of
|
||||
// the unsafe point table.
|
||||
//
|
||||
// An offset of 0 indicates that there is no table.
|
||||
//
|
||||
// pcdata [npcdata]uint32
|
||||
|
||||
// funcdata contains the offset past moduledata.gofunc which contains a
|
||||
// pointer to that index's funcdata. e.g.,
|
||||
// *(moduledata.gofunc + _func.funcdata[_FUNCDATA_ArgsPointerMaps]) is
|
||||
// the argument pointer map.
|
||||
//
|
||||
// An offset of ^uint32(0) indicates that there is no entry.
|
||||
//
|
||||
// funcdata [nfuncdata]uint32
|
||||
}
|
||||
|
||||
// Pseudo-Func that is returned for PCs that occur in inlined code.
|
||||
|
Loading…
Reference in New Issue
Block a user