Commit 8adaf685 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

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: default avatarKeith Randall <khr@golang.org>
Reviewed-by: default avatarMartin Möhrmann <moehrmann@google.com>
parent cf69867a
......@@ -846,11 +846,7 @@ func evacuate_fast32(t *maptype, h *hmap, oldbucket uintptr) {
*(*uint32)(dst.k) = *(*uint32)(k)
}
if t.indirectvalue {
*(*unsafe.Pointer)(dst.v) = *(*unsafe.Pointer)(v)
} else {
typedmemmove(t.elem, dst.v, v)
}
typedmemmove(t.elem, dst.v, v)
dst.i++
// These updates might push these pointers past the end of the
// 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)
}
if t.indirectvalue {
*(*unsafe.Pointer)(dst.v) = *(*unsafe.Pointer)(v)
} else {
typedmemmove(t.elem, dst.v, v)
}
typedmemmove(t.elem, dst.v, v)
dst.i++
// These updates might push these pointers past the end of the
// 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.
*(*string)(dst.k) = *(*string)(k)
if t.indirectvalue {
*(*unsafe.Pointer)(dst.v) = *(*unsafe.Pointer)(v)
} else {
typedmemmove(t.elem, dst.v, v)
}
typedmemmove(t.elem, dst.v, v)
dst.i++
// These updates might push these pointers past the end of the
// key or value arrays. That's ok, as we have the overflow pointer
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment