]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/cmd/compile/internal/test/inl_test.go
runtime: fix user arena heap bits writing on big endian platforms
[gostls13.git] / src / cmd / compile / internal / test / inl_test.go
index e59104df531c38abd08023bb7829634547ef1eda..ea7f317ef52aac34cfe4dcc79061f797fdd6545d 100644 (file)
@@ -6,7 +6,6 @@ package test
 
 import (
        "bufio"
-       "internal/buildcfg"
        "internal/goexperiment"
        "internal/testenv"
        "io"
@@ -52,6 +51,7 @@ func TestIntendedInlining(t *testing.T) {
                        "getMCache",
                        "isDirectIface",
                        "itabHashFunc",
+                       "nextslicecap",
                        "noescape",
                        "pcvalueCacheKey",
                        "readUnaligned32",
@@ -73,11 +73,13 @@ func TestIntendedInlining(t *testing.T) {
                        "gclinkptr.ptr",
                        "guintptr.ptr",
                        "writeHeapBitsForAddr",
+                       "heapBitsSlice",
                        "markBits.isMarked",
                        "muintptr.ptr",
                        "puintptr.ptr",
                        "spanOf",
                        "spanOfUnchecked",
+                       "typePointers.nextFast",
                        "(*gcWork).putFast",
                        "(*gcWork).tryGetFast",
                        "(*guintptr).set",
@@ -86,8 +88,11 @@ func TestIntendedInlining(t *testing.T) {
                        "(*mspan).base",
                        "(*mspan).markBitsForBase",
                        "(*mspan).markBitsForIndex",
+                       "(*mspan).writeUserArenaHeapBits",
                        "(*muintptr).set",
                        "(*puintptr).set",
+                       "(*wbBuf).get1",
+                       "(*wbBuf).get2",
                },
                "runtime/internal/sys": {},
                "runtime/internal/math": {
@@ -106,6 +111,9 @@ func TestIntendedInlining(t *testing.T) {
                        "(*Buffer).UnreadByte",
                        "(*Buffer).tryGrowByReslice",
                },
+               "internal/abi": {
+                       "UseInterfaceSwitchCache",
+               },
                "compress/flate": {
                        "byLiteral.Len",
                        "byLiteral.Less",
@@ -179,6 +187,15 @@ func TestIntendedInlining(t *testing.T) {
                "net": {
                        "(*UDPConn).ReadFromUDP",
                },
+               "sync": {
+                       // Both OnceFunc and its returned closure need to be inlinable so
+                       // that the returned closure can be inlined into the caller of OnceFunc.
+                       "OnceFunc",
+                       "OnceFunc.func2", // The returned closure.
+                       // TODO(austin): It would be good to check OnceValue and OnceValues,
+                       // too, but currently they aren't reported because they have type
+                       // parameters and aren't instantiated in sync.
+               },
                "sync/atomic": {
                        // (*Bool).CompareAndSwap handled below.
                        "(*Bool).Load",
@@ -209,7 +226,10 @@ func TestIntendedInlining(t *testing.T) {
                        "(*Uintptr).Load",
                        "(*Uintptr).Store",
                        "(*Uintptr).Swap",
-                       // (*Pointer[T])'s methods' handled below.
+                       "(*Pointer[go.shape.int]).CompareAndSwap",
+                       "(*Pointer[go.shape.int]).Load",
+                       "(*Pointer[go.shape.int]).Store",
+                       "(*Pointer[go.shape.int]).Swap",
                },
        }
 
@@ -235,14 +255,6 @@ func TestIntendedInlining(t *testing.T) {
                // (*Bool).CompareAndSwap is just over budget on 32-bit systems (386, arm).
                want["sync/atomic"] = append(want["sync/atomic"], "(*Bool).CompareAndSwap")
        }
-       if buildcfg.Experiment.Unified {
-               // Non-unified IR does not report "inlining call ..." for atomic.Pointer[T]'s methods.
-               // TODO(cuonglm): remove once non-unified IR frontend gone.
-               want["sync/atomic"] = append(want["sync/atomic"], "(*Pointer[go.shape.int]).CompareAndSwap")
-               want["sync/atomic"] = append(want["sync/atomic"], "(*Pointer[go.shape.int]).Load")
-               want["sync/atomic"] = append(want["sync/atomic"], "(*Pointer[go.shape.int]).Store")
-               want["sync/atomic"] = append(want["sync/atomic"], "(*Pointer[go.shape.int]).Swap")
-       }
 
        switch runtime.GOARCH {
        case "386", "wasm", "arm":