Skip to content

Commit 45001d3

Browse files
committed
runtime/internal: clean up completely
We've been slowly moving packages from runtime/internal to internal/runtime. For now, runtime/internal only has test packages. It's a good change to clean up the references to runtime/internal in the toolchain. Change-Id: I35c2e86b73d86bd17b58cc74c0682bde1c970a90
1 parent d43c0f8 commit 45001d3

File tree

17 files changed

+9
-14
lines changed

17 files changed

+9
-14
lines changed

src/cmd/dist/test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ func (t *tester) registerTests() {
926926
t.registerTest("wasip1 host tests",
927927
&goTest{
928928
variant: "host",
929-
pkg: "runtime/internal/wasitest",
929+
pkg: "internal/runtime/wasitest",
930930
timeout: 1 * time.Minute,
931931
runOnHost: true,
932932
})

src/cmd/go/internal/load/pkg.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3540,7 +3540,7 @@ func SelectCoverPackages(roots []*Package, match []func(*Package) bool, op strin
35403540
// $GOROOT/src/internal/coverage/pkid.go dealing with
35413541
// hard-coding of runtime package IDs.
35423542
cmode := cfg.BuildCoverMode
3543-
if cfg.BuildRace && p.Standard && (p.ImportPath == "runtime" || strings.HasPrefix(p.ImportPath, "runtime/internal")) {
3543+
if cfg.BuildRace && p.Standard && (p.ImportPath == "runtime") {
35443544
cmode = "regonly"
35453545
}
35463546

src/cmd/internal/objabi/pkgspecial.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ var allowAsmABIPkgs = []string{
9292
"internal/bytealg",
9393
"internal/chacha8rand",
9494
"internal/runtime/syscall",
95-
"runtime/internal/startlinetest",
95+
"internal/runtime/startlinetest",
9696
}
9797

9898
// LookupPkgSpecial returns special build properties for the given package path.

src/cmd/link/internal/ld/data.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ func isRuntimeDepPkg(pkg string) bool {
7878
"unsafe":
7979
return true
8080
}
81-
return (strings.HasPrefix(pkg, "runtime/internal/") || strings.HasPrefix(pkg, "internal/runtime/")) &&
82-
!strings.HasSuffix(pkg, "_test")
81+
return strings.HasPrefix(pkg, "internal/runtime/") && !strings.HasSuffix(pkg, "_test")
8382
}
8483

8584
// Estimate the max size needed to hold any new trampolines created for this function. This

src/net/file_wasip1_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
// socket extensions with the net package using net.FileConn/net.FileListener.
2121
//
2222
// Note that the creation of net.Conn and net.Listener values for TCP sockets
23-
// has an end-to-end test in src/runtime/internal/wasitest, here we are only
23+
// has an end-to-end test in src/internal/runtime/wasitest, here we are only
2424
// verifying the code paths specific to UDP, and error handling for invalid use
2525
// of the functions.
2626

src/runtime/atomic_pointer.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func atomicstorep(ptr unsafe.Pointer, new unsafe.Pointer) {
4949
atomic.StorepNoWB(noescape(ptr), new)
5050
}
5151

52-
// atomic_storePointer is the implementation of runtime/internal/UnsafePointer.Store
52+
// atomic_storePointer is the implementation of internal/runtime/atomic.UnsafePointer.Store
5353
// (like StoreNoWB but with the write barrier).
5454
//
5555
//go:nosplit
@@ -58,7 +58,7 @@ func atomic_storePointer(ptr *unsafe.Pointer, new unsafe.Pointer) {
5858
atomicstorep(unsafe.Pointer(ptr), new)
5959
}
6060

61-
// atomic_casPointer is the implementation of runtime/internal/UnsafePointer.CompareAndSwap
61+
// atomic_casPointer is the implementation of internal/runtime/atomic.UnsafePointer.CompareAndSwap
6262
// (like CompareAndSwapNoWB but with the write barrier).
6363
//
6464
//go:nosplit

src/runtime/panic.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func panicCheck1(pc uintptr, msg string) {
5959
throw(msg)
6060
}
6161
// TODO: is this redundant? How could we be in malloc
62-
// but not in the runtime? runtime/internal/*, maybe?
62+
// but not in the runtime? internal/runtime/*, maybe?
6363
gp := getg()
6464
if gp != nil && gp.m != nil && gp.m.mallocing != 0 {
6565
throw(msg)

src/runtime/pprof/protomem_test.go

-3
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,6 @@ func TestHeapRuntimeFrames(t *testing.T) {
275275
if strings.Contains(l, "internal/runtime/") {
276276
t.Errorf("Sample got %s, want no runtime frames", l)
277277
}
278-
if strings.Contains(l, "runtime/internal/") {
279-
t.Errorf("Sample got %s, want no runtime frames", l)
280-
}
281278
if strings.Contains(l, "mapassign") { // in case mapassign moves to a package not matching above paths.
282279
t.Errorf("Sample got %s, want no mapassign frames", l)
283280
}

src/runtime/preempt.go

-1
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,6 @@ func isAsyncSafePoint(gp *g, pc, sp, lr uintptr) (bool, uintptr) {
418418
u, uf := newInlineUnwinder(f, pc)
419419
name := u.srcFunc(uf).name()
420420
if stringslite.HasPrefix(name, "runtime.") ||
421-
stringslite.HasPrefix(name, "runtime/internal/") ||
422421
stringslite.HasPrefix(name, "internal/runtime/") ||
423422
stringslite.HasPrefix(name, "reflect.") {
424423
// For now we never async preempt the runtime or

src/runtime/start_line_amd64_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
package runtime_test
66

77
import (
8-
"runtime/internal/startlinetest"
8+
"internal/runtime/startlinetest"
99
"testing"
1010
)
1111

0 commit comments

Comments
 (0)