aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/reflectdata/reflect.go
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2021-03-11 15:00:50 -0500
committerCherry Zhang <cherryyz@google.com>2021-03-16 22:40:59 +0000
commitdc1556eaef871074895ed9fdf6028475d53235be (patch)
tree96866248a6068a60024fbd8af77c28d69268ec9f /src/cmd/compile/internal/reflectdata/reflect.go
parentc870e863298a44ead08e0b797d62ea74d7b7c971 (diff)
downloadgo-dc1556eaef871074895ed9fdf6028475d53235be.tar.gz
go-dc1556eaef871074895ed9fdf6028475d53235be.zip
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>
Diffstat (limited to 'src/cmd/compile/internal/reflectdata/reflect.go')
-rw-r--r--src/cmd/compile/internal/reflectdata/reflect.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/cmd/compile/internal/reflectdata/reflect.go b/src/cmd/compile/internal/reflectdata/reflect.go
index 06a7f91c52..0e1de35887 100644
--- a/src/cmd/compile/internal/reflectdata/reflect.go
+++ b/src/cmd/compile/internal/reflectdata/reflect.go
@@ -1525,7 +1525,7 @@ func dgcptrmask(t *types.Type) *obj.LSym {
// fillptrmask fills in ptrmask with 1s corresponding to the
// 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) {
for i := range ptrmask {
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
-// along with the size of the data described by the program (in the range [typeptrdata(t), t.Width]).
-// In practice, the size is typeptrdata(t) except for non-trivial arrays.
+// along with the size of the data described by the program (in the range
+// [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.
func dgcprog(t *types.Type) (*obj.LSym, int64) {
types.CalcSize(t)
@@ -1833,7 +1834,7 @@ func MarkUsedIfaceMethod(n *ir.CallExpr) {
tsym := TypeLinksym(ityp)
r := obj.Addrel(ir.CurFunc.LSym)
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).
midx := dot.Offset() / int64(types.PtrSize)
r.Add = InterfaceMethodOffset(ityp, midx)