mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: update some comments
Update some symbol references after refactoring. Change-Id: I134eec453b69efae97eb8a13e52ff8c14d38442a Reviewed-on: https://go-review.googlesource.com/c/go/+/301790 Trust: Cherry Zhang <cherryyz@google.com> Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
parent
c870e86329
commit
dc1556eaef
1 changed files with 5 additions and 4 deletions
|
|
@ -1525,7 +1525,7 @@ func dgcptrmask(t *types.Type) *obj.LSym {
|
||||||
|
|
||||||
// fillptrmask fills in ptrmask with 1s corresponding to the
|
// fillptrmask fills in ptrmask with 1s corresponding to the
|
||||||
// word offsets in t that hold pointers.
|
// word offsets in t that hold pointers.
|
||||||
// ptrmask is assumed to fit at least typeptrdata(t)/Widthptr bits.
|
// ptrmask is assumed to fit at least types.PtrDataSize(t)/PtrSize bits.
|
||||||
func fillptrmask(t *types.Type, ptrmask []byte) {
|
func fillptrmask(t *types.Type, ptrmask []byte) {
|
||||||
for i := range ptrmask {
|
for i := range ptrmask {
|
||||||
ptrmask[i] = 0
|
ptrmask[i] = 0
|
||||||
|
|
@ -1546,8 +1546,9 @@ func fillptrmask(t *types.Type, ptrmask []byte) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// dgcprog emits and returns the symbol containing a GC program for type t
|
// dgcprog emits and returns the symbol containing a GC program for type t
|
||||||
// along with the size of the data described by the program (in the range [typeptrdata(t), t.Width]).
|
// along with the size of the data described by the program (in the range
|
||||||
// In practice, the size is typeptrdata(t) except for non-trivial arrays.
|
// [types.PtrDataSize(t), t.Width]).
|
||||||
|
// In practice, the size is types.PtrDataSize(t) except for non-trivial arrays.
|
||||||
// For non-trivial arrays, the program describes the full t.Width size.
|
// For non-trivial arrays, the program describes the full t.Width size.
|
||||||
func dgcprog(t *types.Type) (*obj.LSym, int64) {
|
func dgcprog(t *types.Type) (*obj.LSym, int64) {
|
||||||
types.CalcSize(t)
|
types.CalcSize(t)
|
||||||
|
|
@ -1833,7 +1834,7 @@ func MarkUsedIfaceMethod(n *ir.CallExpr) {
|
||||||
tsym := TypeLinksym(ityp)
|
tsym := TypeLinksym(ityp)
|
||||||
r := obj.Addrel(ir.CurFunc.LSym)
|
r := obj.Addrel(ir.CurFunc.LSym)
|
||||||
r.Sym = tsym
|
r.Sym = tsym
|
||||||
// dot.Xoffset is the method index * Widthptr (the offset of code pointer
|
// dot.Xoffset is the method index * PtrSize (the offset of code pointer
|
||||||
// in itab).
|
// in itab).
|
||||||
midx := dot.Offset() / int64(types.PtrSize)
|
midx := dot.Offset() / int64(types.PtrSize)
|
||||||
r.Add = InterfaceMethodOffset(ityp, midx)
|
r.Add = InterfaceMethodOffset(ityp, midx)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue