aboutsummaryrefslogtreecommitdiff
path: root/src/reflect
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2024-04-22 14:17:35 -0400
committerMichael Pratt <mpratt@google.com>2024-08-02 16:47:38 +0000
commit1985c0ccf9ef0736aeb79ef548689aa935fa5c4c (patch)
tree9ac59b7b7c1ebb5a95b6d147d2542e7831e08efd /src/reflect
parent4f7dc282c4bdfba4e63b39bbe9846c1469dc7ee5 (diff)
downloadgo-1985c0ccf9ef0736aeb79ef548689aa935fa5c4c.tar.xz
cmd/compile,runtime: disable swissmap fast variants
Temporary measure to reduce the required MVP code. For #54766. Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest-swissmap Change-Id: I44dc8acd0dc8280c6beb40451998e84bc85c238a Reviewed-on: https://go-review.googlesource.com/c/go/+/580915 Reviewed-by: Keith Randall <khr@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com>
Diffstat (limited to 'src/reflect')
-rw-r--r--src/reflect/map_swiss.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/reflect/map_swiss.go b/src/reflect/map_swiss.go
index 39f799c9b2..4607b6f0f3 100644
--- a/src/reflect/map_swiss.go
+++ b/src/reflect/map_swiss.go
@@ -180,7 +180,8 @@ func (v Value) MapIndex(key Value) Value {
// of unexported fields.
var e unsafe.Pointer
- if (tt.Key == stringType || key.kind() == String) && tt.Key == key.typ() && tt.Elem.Size() <= abi.SwissMapMaxElemBytes {
+ // TODO(#54766): temporarily disable specialized variants.
+ if false && (tt.Key == stringType || key.kind() == String) && tt.Key == key.typ() && tt.Elem.Size() <= abi.SwissMapMaxElemBytes {
k := *(*string)(key.ptr)
e = mapaccess_faststr(v.typ(), v.pointer(), k)
} else {
@@ -423,7 +424,8 @@ func (v Value) SetMapIndex(key, elem Value) {
key.mustBeExported()
tt := (*mapType)(unsafe.Pointer(v.typ()))
- if (tt.Key == stringType || key.kind() == String) && tt.Key == key.typ() && tt.Elem.Size() <= abi.SwissMapMaxElemBytes {
+ // TODO(#54766): temporarily disable specialized variants.
+ if false && (tt.Key == stringType || key.kind() == String) && tt.Key == key.typ() && tt.Elem.Size() <= abi.SwissMapMaxElemBytes {
k := *(*string)(key.ptr)
if elem.typ() == nil {
mapdelete_faststr(v.typ(), v.pointer(), k)