]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: cleanup test code pre Unified IR
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Fri, 17 Nov 2023 11:23:21 +0000 (18:23 +0700)
committerGopher Robot <gobot@golang.org>
Fri, 26 Jul 2024 16:13:46 +0000 (16:13 +0000)
Change-Id: Ibb9a7ce37ac28873aa720a64d1f89cb87fc5fa27
Reviewed-on: https://go-review.googlesource.com/c/go/+/543315
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Tim King <taking@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>

src/cmd/compile/internal/importer/gcimporter_test.go
src/cmd/compile/internal/ssa/debug_lines_test.go

index 7fe4445dad7638b8c06a1a63e1ac9241be80c1c2..9235e4bb95612a0b3d918c6b2bb83451b025e250 100644 (file)
@@ -90,15 +90,9 @@ func TestImportTestdata(t *testing.T) {
        testenv.MustHaveGoBuild(t)
 
        testfiles := map[string][]string{
-               "exports.go":  {"go/ast", "go/token"},
+               "exports.go":  {"go/ast"},
                "generics.go": nil,
        }
-       if true /* was goexperiment.Unified */ {
-               // TODO(mdempsky): Fix test below to flatten the transitive
-               // Package.Imports graph. Unified IR is more precise about
-               // recreating the package import graph.
-               testfiles["exports.go"] = []string{"go/ast"}
-       }
 
        for testfile, wantImports := range testfiles {
                tmpdir := mktmpdir(t)
@@ -336,14 +330,7 @@ func verifyInterfaceMethodRecvs(t *testing.T, named *types2.Named, level int) {
        // The unified IR importer always sets interface method receiver
        // parameters to point to the Interface type, rather than the Named.
        // See #49906.
-       //
-       // TODO(mdempsky): This is only true for the types2 importer. For
-       // the go/types importer, we duplicate the Interface and rewrite its
-       // receiver methods to match historical behavior.
-       var want types2.Type = named
-       if true /* was goexperiment.Unified */ {
-               want = iface
-       }
+       var want types2.Type = iface
 
        // check explicitly declared methods
        for i := 0; i < iface.NumExplicitMethods(); i++ {
index af9e2a34cfc787897f42c0ec3bc5a32f59c5ca19..043439302ee89e004117025ff5e65887494d927f 100644 (file)
@@ -82,11 +82,7 @@ func TestDebugLinesPushback(t *testing.T) {
                t.Skip("skipped for many architectures")
 
        case "arm64", "amd64": // register ABI
-               fn := "(*List[go.shape.int_0]).PushBack"
-               if true /* was buildcfg.Experiment.Unified */ {
-                       // Unified mangles differently
-                       fn = "(*List[go.shape.int]).PushBack"
-               }
+               fn := "(*List[go.shape.int]).PushBack"
                testDebugLines(t, "-N -l", "pushback.go", fn, []int{17, 18, 19, 20, 21, 22, 24}, true)
        }
 }
@@ -99,11 +95,7 @@ func TestDebugLinesConvert(t *testing.T) {
                t.Skip("skipped for many architectures")
 
        case "arm64", "amd64": // register ABI
-               fn := "G[go.shape.int_0]"
-               if true /* was buildcfg.Experiment.Unified */ {
-                       // Unified mangles differently
-                       fn = "G[go.shape.int]"
-               }
+               fn := "G[go.shape.int]"
                testDebugLines(t, "-N -l", "convertline.go", fn, []int{9, 10, 11}, true)
        }
 }