Skip to content

Commit 2ae059c

Browse files
prattmicgopherbot
authored andcommitted
all: remove GOEXPERIMENT=swissmap
For #54766. Change-Id: I6a6a636c40b5fe2e8b0d4a5e23933492bc8bb76e Reviewed-on: https://go-review.googlesource.com/c/go/+/691595 Reviewed-by: Keith Randall <[email protected]> Auto-Submit: Michael Pratt <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Keith Randall <[email protected]>
1 parent cc571da commit 2ae059c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+762
-6140
lines changed

src/cmd/compile/internal/gc/main.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,10 @@ func Main(archInit func(*ssagen.ArchInfo)) {
104104
ir.Pkgs.Runtime = types.NewPkg("go.runtime", "runtime")
105105
ir.Pkgs.Runtime.Prefix = "runtime"
106106

107-
if buildcfg.Experiment.SwissMap {
108-
// Pseudo-package that contains the compiler's builtin
109-
// declarations for maps.
110-
ir.Pkgs.InternalMaps = types.NewPkg("go.internal/runtime/maps", "internal/runtime/maps")
111-
ir.Pkgs.InternalMaps.Prefix = "internal/runtime/maps"
112-
}
107+
// Pseudo-package that contains the compiler's builtin
108+
// declarations for maps.
109+
ir.Pkgs.InternalMaps = types.NewPkg("go.internal/runtime/maps", "internal/runtime/maps")
110+
ir.Pkgs.InternalMaps.Prefix = "internal/runtime/maps"
113111

114112
// pseudo-packages used in symbol tables
115113
ir.Pkgs.Itab = types.NewPkg("go.itab", "go.itab")

src/cmd/compile/internal/reflectdata/map_noswiss.go

Lines changed: 0 additions & 305 deletions
This file was deleted.

src/cmd/compile/internal/reflectdata/reflect.go

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"encoding/binary"
99
"fmt"
1010
"internal/abi"
11-
"internal/buildcfg"
1211
"slices"
1312
"sort"
1413
"strings"
@@ -773,11 +772,7 @@ func writeType(t *types.Type) *obj.LSym {
773772
rt = rttype.InterfaceType
774773
dataAdd = len(imethods(t)) * int(rttype.IMethod.Size())
775774
case types.TMAP:
776-
if buildcfg.Experiment.SwissMap {
777-
rt = rttype.SwissMapType
778-
} else {
779-
rt = rttype.OldMapType
780-
}
775+
rt = rttype.MapType
781776
case types.TPTR:
782777
rt = rttype.PtrType
783778
// TODO: use rttype.Type for Elem() is ANY?
@@ -877,11 +872,7 @@ func writeType(t *types.Type) *obj.LSym {
877872
}
878873

879874
case types.TMAP:
880-
if buildcfg.Experiment.SwissMap {
881-
writeSwissMapType(t, lsym, c)
882-
} else {
883-
writeOldMapType(t, lsym, c)
884-
}
875+
writeSwissMapType(t, lsym, c)
885876

886877
case types.TPTR:
887878
// internal/abi.PtrType

src/cmd/compile/internal/rttype/rttype.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ var ArrayType *types.Type
2727
var ChanType *types.Type
2828
var FuncType *types.Type
2929
var InterfaceType *types.Type
30-
var OldMapType *types.Type
31-
var SwissMapType *types.Type
30+
var MapType *types.Type
3231
var PtrType *types.Type
3332
var SliceType *types.Type
3433
var StructType *types.Type
@@ -55,8 +54,7 @@ func Init() {
5554
ChanType = FromReflect(reflect.TypeOf(abi.ChanType{}))
5655
FuncType = FromReflect(reflect.TypeOf(abi.FuncType{}))
5756
InterfaceType = FromReflect(reflect.TypeOf(abi.InterfaceType{}))
58-
OldMapType = FromReflect(reflect.TypeOf(abi.OldMapType{}))
59-
SwissMapType = FromReflect(reflect.TypeOf(abi.SwissMapType{}))
57+
MapType = FromReflect(reflect.TypeOf(abi.SwissMapType{}))
6058
PtrType = FromReflect(reflect.TypeOf(abi.PtrType{}))
6159
SliceType = FromReflect(reflect.TypeOf(abi.SliceType{}))
6260
StructType = FromReflect(reflect.TypeOf(abi.StructType{}))

0 commit comments

Comments
 (0)