From e306d0606379cc9330302f97f237ca3ef55fee98 Mon Sep 17 00:00:00 2001 From: Makdon Date: Wed, 7 Apr 2021 15:24:46 +0000 Subject: runtime/map: update comment for gc/reflect update comment cause gc/reflect.go has been moved to reflectdata/reflect.go In the commit (attach below), gc/reflect.go is moved to reflectdata/reflect.go So the comment referring gc/reflect.go should be updated to reflectdata/reflect.go There maybe other places that refers gc/reflect.go that should be updated. I would work around it soon. commit: https://github.com/golang/go/commit/de65151e507e7b3c8e46d74f223d7c562177bedc https://github.com/golang/go/commit/e4895ab4c0eb44de6ddc5dc8d860a827b20d2781 Change-Id: Ieed5c48049ffe6889c08e164972fc7825653ac05 GitHub-Last-Rev: eec9c2328d0be40842c3994f26f26f03fa650a91 GitHub-Pull-Request: golang/go#45421 Reviewed-on: https://go-review.googlesource.com/c/go/+/307930 Reviewed-by: Keith Randall Trust: Emmanuel Odeke --- src/runtime/map.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/runtime') diff --git a/src/runtime/map.go b/src/runtime/map.go index 0beff57a1a..40e19c9294 100644 --- a/src/runtime/map.go +++ b/src/runtime/map.go @@ -113,7 +113,7 @@ func isEmpty(x uint8) bool { // A header for a Go map. type hmap struct { - // Note: the format of the hmap is also encoded in cmd/compile/internal/gc/reflect.go. + // Note: the format of the hmap is also encoded in cmd/compile/internal/reflectdata/reflect.go. // Make sure this stays in sync with the compiler's definition. count int // # live cells == size of map. Must be first (used by len() builtin) flags uint8 @@ -159,11 +159,11 @@ type bmap struct { } // A hash iteration structure. -// If you modify hiter, also change cmd/compile/internal/gc/reflect.go to indicate +// If you modify hiter, also change cmd/compile/internal/reflectdata/reflect.go to indicate // the layout of this structure. type hiter struct { - key unsafe.Pointer // Must be in first position. Write nil to indicate iteration end (see cmd/compile/internal/gc/range.go). - elem unsafe.Pointer // Must be in second position (see cmd/compile/internal/gc/range.go). + key unsafe.Pointer // Must be in first position. Write nil to indicate iteration end (see cmd/compile/internal/walk/range.go). + elem unsafe.Pointer // Must be in second position (see cmd/compile/internal/walk/range.go). t *maptype h *hmap buckets unsafe.Pointer // bucket ptr at hash_iter initialization time @@ -810,7 +810,7 @@ func mapiterinit(t *maptype, h *hmap, it *hiter) { } if unsafe.Sizeof(hiter{})/sys.PtrSize != 12 { - throw("hash_iter size incorrect") // see cmd/compile/internal/gc/reflect.go + throw("hash_iter size incorrect") // see cmd/compile/internal/reflectdata/reflect.go } it.t = t it.h = h -- cgit v1.3-5-g9baa