]> Cypherpunks repositories - gostls13.git/commitdiff
reflect: set swissmap GroupSize
authorMichael Pratt <mpratt@google.com>
Thu, 21 Nov 2024 14:51:44 +0000 (09:51 -0500)
committerGopher Robot <gobot@golang.org>
Thu, 21 Nov 2024 15:52:29 +0000 (15:52 +0000)
This was missed in CL 627716.

For #54766.

Change-Id: Ib987efa8abe6e89367e2e1b71a33b64ac6b01b1f
Reviewed-on: https://go-review.googlesource.com/c/go/+/630279
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/reflect/map_swiss.go

index a278f81e815aa992e93f603bfe226ae38e6d97aa..7098e212912916755b5cc5cff0c8a7319f937f7a 100644 (file)
@@ -71,6 +71,7 @@ func MapOf(key, elem Type) Type {
        mt.Hasher = func(p unsafe.Pointer, seed uintptr) uintptr {
                return typehash(ktyp, p, seed)
        }
+       mt.GroupSize = mt.Group.Size()
        mt.SlotSize = slot.Size()
        mt.ElemOff = slot.Field(1).Offset
        mt.Flags = 0