mirror of
https://github.com/golang/go
synced 2024-11-22 16:04:40 -07:00
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>
This commit is contained in:
parent
d1180dbd5e
commit
90b1dc0192
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user