]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/internal: clean up completely
authorJes Cok <xigua67damn@gmail.com>
Fri, 7 Mar 2025 01:04:13 +0000 (01:04 +0000)
committerMichael Pratt <mpratt@google.com>
Tue, 11 Mar 2025 19:26:32 +0000 (12:26 -0700)
We've been slowly moving packages from runtime/internal to
internal/runtime. For now, runtime/internal only has test packages.

It's a good chance to clean up the references to runtime/internal
in the toolchain.

For #65355.

Change-Id: Ie6f9091a44511d0db9946ea6de7a78d3afe9f063
GitHub-Last-Rev: fad32e2e81d11508e734c3c3d3b0c1da583f89f5
GitHub-Pull-Request: golang/go#72137
Reviewed-on: https://go-review.googlesource.com/c/go/+/655515
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
17 files changed:
src/cmd/dist/test.go
src/cmd/go/internal/load/pkg.go
src/cmd/internal/objabi/pkgspecial.go
src/cmd/link/internal/ld/data.go
src/internal/runtime/startlinetest/func_amd64.go [moved from src/runtime/internal/startlinetest/func_amd64.go with 100% similarity]
src/internal/runtime/startlinetest/func_amd64.s [moved from src/runtime/internal/startlinetest/func_amd64.s with 100% similarity]
src/internal/runtime/wasitest/host_test.go [moved from src/runtime/internal/wasitest/host_test.go with 100% similarity]
src/internal/runtime/wasitest/nonblock_test.go [moved from src/runtime/internal/wasitest/nonblock_test.go with 100% similarity]
src/internal/runtime/wasitest/tcpecho_test.go [moved from src/runtime/internal/wasitest/tcpecho_test.go with 100% similarity]
src/internal/runtime/wasitest/testdata/nonblock.go [moved from src/runtime/internal/wasitest/testdata/nonblock.go with 100% similarity]
src/internal/runtime/wasitest/testdata/tcpecho.go [moved from src/runtime/internal/wasitest/testdata/tcpecho.go with 100% similarity]
src/net/file_wasip1_test.go
src/runtime/atomic_pointer.go
src/runtime/panic.go
src/runtime/pprof/protomem_test.go
src/runtime/preempt.go
src/runtime/start_line_amd64_test.go

index 6199dbbb93cdcc5719979a82afcd822e1b452a96..a380e46c5dadd4f70ac42ec283e33a7539714c00 100644 (file)
@@ -926,7 +926,7 @@ func (t *tester) registerTests() {
                t.registerTest("wasip1 host tests",
                        &goTest{
                                variant:   "host",
-                               pkg:       "runtime/internal/wasitest",
+                               pkg:       "internal/runtime/wasitest",
                                timeout:   1 * time.Minute,
                                runOnHost: true,
                        })
index 8f62abe663260e37a1b592596d6d9e2d6e4d8dbe..9d8523725aa596a327d4e7c791b66bfc477ef643 100644 (file)
@@ -3561,7 +3561,7 @@ func SelectCoverPackages(roots []*Package, match []func(*Package) bool, op strin
                // $GOROOT/src/internal/coverage/pkid.go dealing with
                // hard-coding of runtime package IDs.
                cmode := cfg.BuildCoverMode
-               if cfg.BuildRace && p.Standard && (p.ImportPath == "runtime" || strings.HasPrefix(p.ImportPath, "runtime/internal")) {
+               if cfg.BuildRace && p.Standard && p.ImportPath == "runtime" {
                        cmode = "regonly"
                }
 
index 871c28f58829ab4e7505b15b84ff4612e6d2b30a..118d2d412678d0d38cd65c120537bd511e9f2d11 100644 (file)
@@ -92,7 +92,7 @@ var allowAsmABIPkgs = []string{
        "internal/bytealg",
        "internal/chacha8rand",
        "internal/runtime/syscall",
-       "runtime/internal/startlinetest",
+       "internal/runtime/startlinetest",
 }
 
 // LookupPkgSpecial returns special build properties for the given package path.
index 0fd3bacd2fb454cea9ed173ebe8bf3004ed64dfe..67ee71bab3193913ba063b680af61ef13c8b5a3a 100644 (file)
@@ -78,8 +78,7 @@ func isRuntimeDepPkg(pkg string) bool {
                "unsafe":
                return true
        }
-       return (strings.HasPrefix(pkg, "runtime/internal/") || strings.HasPrefix(pkg, "internal/runtime/")) &&
-               !strings.HasSuffix(pkg, "_test")
+       return strings.HasPrefix(pkg, "internal/runtime/") && !strings.HasSuffix(pkg, "_test")
 }
 
 // Estimate the max size needed to hold any new trampolines created for this function. This
index 4f4259069d1f739ee570110bc94125f6bc0fc1c4..91f57eecdacf6ea5d32853a1bacb33cf6b63b70e 100644 (file)
@@ -20,7 +20,7 @@ import (
 // socket extensions with the net package using net.FileConn/net.FileListener.
 //
 // Note that the creation of net.Conn and net.Listener values for TCP sockets
-// has an end-to-end test in src/runtime/internal/wasitest, here we are only
+// has an end-to-end test in src/internal/runtime/wasitest, here we are only
 // verifying the code paths specific to UDP, and error handling for invalid use
 // of the functions.
 
index df067ede77f8eb8ac3b378142761aeeda003cc30..311ef7d0bda300ba6ac116cf87419c9a3b935023 100644 (file)
@@ -49,7 +49,7 @@ func atomicstorep(ptr unsafe.Pointer, new unsafe.Pointer) {
        atomic.StorepNoWB(noescape(ptr), new)
 }
 
-// atomic_storePointer is the implementation of runtime/internal/UnsafePointer.Store
+// atomic_storePointer is the implementation of internal/runtime/atomic.UnsafePointer.Store
 // (like StoreNoWB but with the write barrier).
 //
 //go:nosplit
@@ -58,7 +58,7 @@ func atomic_storePointer(ptr *unsafe.Pointer, new unsafe.Pointer) {
        atomicstorep(unsafe.Pointer(ptr), new)
 }
 
-// atomic_casPointer is the implementation of runtime/internal/UnsafePointer.CompareAndSwap
+// atomic_casPointer is the implementation of internal/runtime/atomic.UnsafePointer.CompareAndSwap
 // (like CompareAndSwapNoWB but with the write barrier).
 //
 //go:nosplit
index c31cfd6e1aeff4e2772cdff776faee39bfcc7b07..07a96a237b887684155852289b806ada6a6910c8 100644 (file)
@@ -59,7 +59,7 @@ func panicCheck1(pc uintptr, msg string) {
                throw(msg)
        }
        // TODO: is this redundant? How could we be in malloc
-       // but not in the runtime? runtime/internal/*, maybe?
+       // but not in the runtime? internal/runtime/*, maybe?
        gp := getg()
        if gp != nil && gp.m != nil && gp.m.mallocing != 0 {
                throw(msg)
index 4d08e67ddc7540123367c35f37a631ae0c5c9dd8..43f4d3efe1c9e8ed2e81ceccd8b1851ac28089d7 100644 (file)
@@ -275,9 +275,6 @@ func TestHeapRuntimeFrames(t *testing.T) {
                if strings.Contains(l, "internal/runtime/") {
                        t.Errorf("Sample got %s, want no runtime frames", l)
                }
-               if strings.Contains(l, "runtime/internal/") {
-                       t.Errorf("Sample got %s, want no runtime frames", l)
-               }
                if strings.Contains(l, "mapassign") { // in case mapassign moves to a package not matching above paths.
                        t.Errorf("Sample got %s, want no mapassign frames", l)
                }
index 839f3875be318bd25dc5da0f27c70e346a867857..c41c3558359c0cb625455392a6004173292f6bab 100644 (file)
@@ -418,7 +418,6 @@ func isAsyncSafePoint(gp *g, pc, sp, lr uintptr) (bool, uintptr) {
        u, uf := newInlineUnwinder(f, pc)
        name := u.srcFunc(uf).name()
        if stringslite.HasPrefix(name, "runtime.") ||
-               stringslite.HasPrefix(name, "runtime/internal/") ||
                stringslite.HasPrefix(name, "internal/runtime/") ||
                stringslite.HasPrefix(name, "reflect.") {
                // For now we never async preempt the runtime or
index 305ed0b126621f24942fc13bfa16822b3ca3d037..0b4807ad154c3920bc8ea264784a57d74a374e48 100644 (file)
@@ -5,7 +5,7 @@
 package runtime_test
 
 import (
-       "runtime/internal/startlinetest"
+       "internal/runtime/startlinetest"
        "testing"
 )