mirror of
https://github.com/golang/go
synced 2024-11-19 16:04:48 -07:00
runtime: remove t.indirectvalue handling in fast evacuation routines
Maps with indirect values use the generic map routines. Change-Id: Ib211e93f1dacefb988ba3d279f92a13065168079 Reviewed-on: https://go-review.googlesource.com/59135 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Martin Möhrmann <moehrmann@google.com>
This commit is contained in:
parent
cf69867af4
commit
8adaf68570
@ -846,11 +846,7 @@ func evacuate_fast32(t *maptype, h *hmap, oldbucket uintptr) {
|
|||||||
*(*uint32)(dst.k) = *(*uint32)(k)
|
*(*uint32)(dst.k) = *(*uint32)(k)
|
||||||
}
|
}
|
||||||
|
|
||||||
if t.indirectvalue {
|
typedmemmove(t.elem, dst.v, v)
|
||||||
*(*unsafe.Pointer)(dst.v) = *(*unsafe.Pointer)(v)
|
|
||||||
} else {
|
|
||||||
typedmemmove(t.elem, dst.v, v)
|
|
||||||
}
|
|
||||||
dst.i++
|
dst.i++
|
||||||
// These updates might push these pointers past the end of the
|
// These updates might push these pointers past the end of the
|
||||||
// key or value arrays. That's ok, as we have the overflow pointer
|
// key or value arrays. That's ok, as we have the overflow pointer
|
||||||
@ -956,11 +952,7 @@ func evacuate_fast64(t *maptype, h *hmap, oldbucket uintptr) {
|
|||||||
*(*uint64)(dst.k) = *(*uint64)(k)
|
*(*uint64)(dst.k) = *(*uint64)(k)
|
||||||
}
|
}
|
||||||
|
|
||||||
if t.indirectvalue {
|
typedmemmove(t.elem, dst.v, v)
|
||||||
*(*unsafe.Pointer)(dst.v) = *(*unsafe.Pointer)(v)
|
|
||||||
} else {
|
|
||||||
typedmemmove(t.elem, dst.v, v)
|
|
||||||
}
|
|
||||||
dst.i++
|
dst.i++
|
||||||
// These updates might push these pointers past the end of the
|
// These updates might push these pointers past the end of the
|
||||||
// key or value arrays. That's ok, as we have the overflow pointer
|
// key or value arrays. That's ok, as we have the overflow pointer
|
||||||
@ -1056,11 +1048,7 @@ func evacuate_faststr(t *maptype, h *hmap, oldbucket uintptr) {
|
|||||||
// Copy key.
|
// Copy key.
|
||||||
*(*string)(dst.k) = *(*string)(k)
|
*(*string)(dst.k) = *(*string)(k)
|
||||||
|
|
||||||
if t.indirectvalue {
|
typedmemmove(t.elem, dst.v, v)
|
||||||
*(*unsafe.Pointer)(dst.v) = *(*unsafe.Pointer)(v)
|
|
||||||
} else {
|
|
||||||
typedmemmove(t.elem, dst.v, v)
|
|
||||||
}
|
|
||||||
dst.i++
|
dst.i++
|
||||||
// These updates might push these pointers past the end of the
|
// These updates might push these pointers past the end of the
|
||||||
// key or value arrays. That's ok, as we have the overflow pointer
|
// key or value arrays. That's ok, as we have the overflow pointer
|
||||||
|
Loading…
Reference in New Issue
Block a user