internal/walk: update comment for previous refactor

This commit is contained in:
Makdon 2021-04-07 23:22:59 +08:00 committed by GitHub
parent 6bfbb4bded
commit eec9c2328d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -168,7 +168,9 @@ func walkRange(nrange *ir.RangeStmt) ir.Node {
hit := nrange.Prealloc hit := nrange.Prealloc
th := hit.Type() th := hit.Type()
keysym := th.Field(0).Sym // depends on layout of iterator struct. See reflect.go:MapIterType // depends on layout of iterator struct.
// See cmd/compile/internal/reflectdata/reflect.go:MapIterType
keysym := th.Field(0).Sym
elemsym := th.Field(1).Sym // ditto elemsym := th.Field(1).Sym // ditto
fn := typecheck.LookupRuntime("mapiterinit") fn := typecheck.LookupRuntime("mapiterinit")