diff options
| author | khr@golang.org <khr@golang.org> | 2024-11-17 13:24:43 -0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-11-18 02:09:01 +0000 |
| commit | 90b1dc0192b62e4007031cf8b472023da08f7ca7 (patch) | |
| tree | ad6e156f84a30baa063ffe2ad96c0b42dea87c34 /src/internal/runtime | |
| parent | d1180dbd5e5728d268e0dda01fd2daa261911ec8 (diff) | |
| download | go-90b1dc0192b62e4007031cf8b472023da08f7ca7.tar.xz | |
internal/runtime/maps: fix noswiss builder
Missed initializing a field in the stub that lets the noswiss
builder test the swiss implementation.
Change-Id: Ie093478ad3e4301e4fe88ba65c132a9dbccd89a9
Reviewed-on: https://go-review.googlesource.com/c/go/+/628895
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/internal/runtime')
| -rw-r--r-- | src/internal/runtime/maps/export_noswiss_test.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/internal/runtime/maps/export_noswiss_test.go b/src/internal/runtime/maps/export_noswiss_test.go index 0cb262f207..333fc6ce90 100644 --- a/src/internal/runtime/maps/export_noswiss_test.go +++ b/src/internal/runtime/maps/export_noswiss_test.go @@ -33,12 +33,13 @@ func newTestMapType[K comparable, V any]() *abi.SwissMapType { var slot instantiatedSlot[K, V] mt := &abi.SwissMapType{ - Key: omt.Key, - Elem: omt.Elem, - Group: abi.TypeOf(grp), - Hasher: omt.Hasher, - SlotSize: unsafe.Sizeof(slot), - ElemOff: unsafe.Offsetof(slot.elem), + Key: omt.Key, + Elem: omt.Elem, + Group: abi.TypeOf(grp), + Hasher: omt.Hasher, + SlotSize: unsafe.Sizeof(slot), + GroupSize: unsafe.Sizeof(grp), + ElemOff: unsafe.Offsetof(slot.elem), } if omt.NeedKeyUpdate() { mt.Flags |= abi.SwissMapNeedKeyUpdate |
