slotKey := g.key(typ, i)
if key == *(*uint32)(slotKey) {
- slotElem := g.elem(typ, i)
+ slotElem := unsafe.Pointer(uintptr(slotKey) + typ.ElemOff)
return slotElem
}
match = match.removeFirst()
slotKey := g.key(typ, i)
if key == *(*uint32)(slotKey) {
- slotElem := g.elem(typ, i)
+ slotElem := unsafe.Pointer(uintptr(slotKey) + typ.ElemOff)
return slotElem, true
}
match = match.removeFirst()
slotKey := g.key(typ, i)
if key == *(*uint64)(slotKey) {
- slotElem := g.elem(typ, i)
+ slotElem := unsafe.Pointer(uintptr(slotKey) + typ.ElemOff)
return slotElem
}
match = match.removeFirst()
slotKey := g.key(typ, i)
if key == *(*uint64)(slotKey) {
- slotElem := g.elem(typ, i)
+ slotElem := unsafe.Pointer(uintptr(slotKey) + typ.ElemOff)
return slotElem, true
}
match = match.removeFirst()
slotKey := g.key(typ, i)
if key == *(*string)(slotKey) {
- slotElem := g.elem(typ, i)
+ slotElem := unsafe.Pointer(uintptr(slotKey) + typ.ElemOff)
return slotElem
}
match = match.removeFirst()
slotKey := g.key(typ, i)
if key == *(*string)(slotKey) {
- slotElem := g.elem(typ, i)
+ slotElem := unsafe.Pointer(uintptr(slotKey) + typ.ElemOff)
return slotElem, true
}
match = match.removeFirst()
i := match.first()
slotKey := g.key(typ, i)
+ slotKeyOrig := slotKey
if typ.IndirectKey() {
slotKey = *((*unsafe.Pointer)(slotKey))
}
if typ.Key.Equal(key, slotKey) {
- slotElem := g.elem(typ, i)
+ slotElem := unsafe.Pointer(uintptr(slotKeyOrig) + typ.ElemOff)
if typ.IndirectElem() {
slotElem = *((*unsafe.Pointer)(slotElem))
}
i := match.first()
slotKey := g.key(typ, i)
+ slotKeyOrig := slotKey
if typ.IndirectKey() {
slotKey = *((*unsafe.Pointer)(slotKey))
}
if typ.Key.Equal(key, slotKey) {
- slotElem := g.elem(typ, i)
+ slotElem := unsafe.Pointer(uintptr(slotKeyOrig) + typ.ElemOff)
if typ.IndirectElem() {
slotElem = *((*unsafe.Pointer)(slotElem))
}
i := match.first()
slotKey := g.key(typ, i)
+ slotKeyOrig := slotKey
if typ.IndirectKey() {
slotKey = *((*unsafe.Pointer)(slotKey))
}
typedmemmove(typ.Key, slotKey, key)
}
- slotElem = g.elem(typ, i)
+ slotElem = unsafe.Pointer(uintptr(slotKeyOrig) + typ.ElemOff)
if typ.IndirectElem() {
slotElem = *((*unsafe.Pointer)(slotElem))
}
// If there is room left to grow, just insert the new entry.
if t.growthLeft > 0 {
slotKey := g.key(typ, i)
+ slotKeyOrig := slotKey
if typ.IndirectKey() {
kmem := newobject(typ.Key)
*(*unsafe.Pointer)(slotKey) = kmem
}
typedmemmove(typ.Key, slotKey, key)
- slotElem = g.elem(typ, i)
+ slotElem = unsafe.Pointer(uintptr(slotKeyOrig) + typ.ElemOff)
if typ.IndirectElem() {
emem := newobject(typ.Elem)
*(*unsafe.Pointer)(slotElem) = emem