Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime/internal: clean up completely #72137

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cmd/dist/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/go/internal/load/pkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -3540,7 +3540,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"
}

Expand Down
2 changes: 1 addition & 1 deletion src/cmd/internal/objabi/pkgspecial.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 1 addition & 2 deletions src/cmd/link/internal/ld/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/net/file_wasip1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions src/runtime/atomic_pointer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/panic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions src/runtime/pprof/protomem_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
1 change: 0 additions & 1 deletion src/runtime/preempt.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/start_line_amd64_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package runtime_test

import (
"runtime/internal/startlinetest"
"internal/runtime/startlinetest"
"testing"
)

Expand Down