diff options
Diffstat (limited to 'src/cmd')
| -rw-r--r-- | src/cmd/compile/internal/noder/helpers.go | 4 | ||||
| -rw-r--r-- | src/cmd/compile/internal/ssagen/ssa.go | 26 | ||||
| -rw-r--r-- | src/cmd/compile/internal/test/inl_test.go | 8 | ||||
| -rw-r--r-- | src/cmd/compile/internal/types/pkg.go | 2 | ||||
| -rw-r--r-- | src/cmd/compile/internal/types/type.go | 2 | ||||
| -rw-r--r-- | src/cmd/dist/build.go | 4 | ||||
| -rw-r--r-- | src/cmd/distpack/pack.go | 2 | ||||
| -rw-r--r-- | src/cmd/distpack/test.go | 2 | ||||
| -rw-r--r-- | src/cmd/go/go_test.go | 6 | ||||
| -rw-r--r-- | src/cmd/internal/objabi/pkgspecial.go | 2 | ||||
| -rw-r--r-- | src/cmd/internal/objabi/stack.go | 2 |
11 files changed, 30 insertions, 30 deletions
diff --git a/src/cmd/compile/internal/noder/helpers.go b/src/cmd/compile/internal/noder/helpers.go index 0bff71e658..45512706d2 100644 --- a/src/cmd/compile/internal/noder/helpers.go +++ b/src/cmd/compile/internal/noder/helpers.go @@ -114,11 +114,11 @@ func isTypeParam(t types2.Type) bool { } // isNotInHeap reports whether typ is or contains an element of type -// runtime/internal/sys.NotInHeap. +// internal/runtime/sys.NotInHeap. func isNotInHeap(typ types2.Type) bool { typ = types2.Unalias(typ) if named, ok := typ.(*types2.Named); ok { - if obj := named.Obj(); obj.Name() == "nih" && obj.Pkg().Path() == "runtime/internal/sys" { + if obj := named.Obj(); obj.Name() == "nih" && obj.Pkg().Path() == "internal/runtime/sys" { return true } typ = named.Underlying() diff --git a/src/cmd/compile/internal/ssagen/ssa.go b/src/cmd/compile/internal/ssagen/ssa.go index d0ca5b7f30..e6d5a13957 100644 --- a/src/cmd/compile/internal/ssagen/ssa.go +++ b/src/cmd/compile/internal/ssagen/ssa.go @@ -4287,13 +4287,13 @@ func InitTables() { // make it worthwhile as an intrinsic brev_arch = append(brev_arch, sys.PPC64) } - /******** runtime/internal/sys ********/ - addF("runtime/internal/sys", "Bswap32", + /******** internal/runtime/sys ********/ + addF("internal/runtime/sys", "Bswap32", func(s *state, n *ir.CallExpr, args []*ssa.Value) *ssa.Value { return s.newValue1(ssa.OpBswap32, types.Types[types.TUINT32], args[0]) }, brev_arch...) - addF("runtime/internal/sys", "Bswap64", + addF("internal/runtime/sys", "Bswap64", func(s *state, n *ir.CallExpr, args []*ssa.Value) *ssa.Value { return s.newValue1(ssa.OpBswap64, types.Types[types.TUINT64], args[0]) }, @@ -4309,9 +4309,9 @@ func InitTables() { // Make Prefetch intrinsics for supported platforms // On the unsupported platforms stub function will be eliminated - addF("runtime/internal/sys", "Prefetch", makePrefetchFunc(ssa.OpPrefetchCache), + addF("internal/runtime/sys", "Prefetch", makePrefetchFunc(ssa.OpPrefetchCache), sys.AMD64, sys.ARM64, sys.PPC64) - addF("runtime/internal/sys", "PrefetchStreamed", makePrefetchFunc(ssa.OpPrefetchCacheStreamed), + addF("internal/runtime/sys", "PrefetchStreamed", makePrefetchFunc(ssa.OpPrefetchCacheStreamed), sys.AMD64, sys.ARM64, sys.PPC64) /******** internal/runtime/atomic ********/ @@ -4837,8 +4837,8 @@ func InitTables() { return s.newValue1(ssa.OpCtz64, types.Types[types.TINT], y) }, sys.S390X) - alias("math/bits", "ReverseBytes64", "runtime/internal/sys", "Bswap64", all...) - alias("math/bits", "ReverseBytes32", "runtime/internal/sys", "Bswap32", all...) + alias("math/bits", "ReverseBytes64", "internal/runtime/sys", "Bswap64", all...) + alias("math/bits", "ReverseBytes32", "internal/runtime/sys", "Bswap32", all...) // ReverseBytes inlines correctly, no need to intrinsify it. // Nothing special is needed for targets where ReverseBytes16 lowers to a rotate // On Power10, 16-bit rotate is not available so use BRH instruction @@ -5051,12 +5051,12 @@ func InitTables() { sys.AMD64) alias("math/bits", "Div", "math/bits", "Div64", sys.ArchAMD64) - alias("runtime/internal/sys", "TrailingZeros8", "math/bits", "TrailingZeros8", all...) - alias("runtime/internal/sys", "TrailingZeros32", "math/bits", "TrailingZeros32", all...) - alias("runtime/internal/sys", "TrailingZeros64", "math/bits", "TrailingZeros64", all...) - alias("runtime/internal/sys", "Len8", "math/bits", "Len8", all...) - alias("runtime/internal/sys", "Len64", "math/bits", "Len64", all...) - alias("runtime/internal/sys", "OnesCount64", "math/bits", "OnesCount64", all...) + alias("internal/runtime/sys", "TrailingZeros8", "math/bits", "TrailingZeros8", all...) + alias("internal/runtime/sys", "TrailingZeros32", "math/bits", "TrailingZeros32", all...) + alias("internal/runtime/sys", "TrailingZeros64", "math/bits", "TrailingZeros64", all...) + alias("internal/runtime/sys", "Len8", "math/bits", "Len8", all...) + alias("internal/runtime/sys", "Len64", "math/bits", "Len64", all...) + alias("internal/runtime/sys", "OnesCount64", "math/bits", "OnesCount64", all...) /******** sync/atomic ********/ diff --git a/src/cmd/compile/internal/test/inl_test.go b/src/cmd/compile/internal/test/inl_test.go index 4626269582..58f5df953b 100644 --- a/src/cmd/compile/internal/test/inl_test.go +++ b/src/cmd/compile/internal/test/inl_test.go @@ -97,7 +97,7 @@ func TestIntendedInlining(t *testing.T) { "traceLocker.ok", "traceEnabled", }, - "runtime/internal/sys": {}, + "internal/runtime/sys": {}, "internal/runtime/math": { "MulUintptr", }, @@ -246,9 +246,9 @@ func TestIntendedInlining(t *testing.T) { if runtime.GOARCH != "386" { // As explained above, TrailingZeros64 and TrailingZeros32 are not Go code on 386. // The same applies to Bswap32. - want["runtime/internal/sys"] = append(want["runtime/internal/sys"], "TrailingZeros64") - want["runtime/internal/sys"] = append(want["runtime/internal/sys"], "TrailingZeros32") - want["runtime/internal/sys"] = append(want["runtime/internal/sys"], "Bswap32") + want["internal/runtime/sys"] = append(want["internal/runtime/sys"], "TrailingZeros64") + want["internal/runtime/sys"] = append(want["internal/runtime/sys"], "TrailingZeros32") + want["internal/runtime/sys"] = append(want["internal/runtime/sys"], "Bswap32") } if runtime.GOARCH == "amd64" || runtime.GOARCH == "arm64" || runtime.GOARCH == "loong64" || runtime.GOARCH == "mips" || runtime.GOARCH == "mips64" || runtime.GOARCH == "ppc64" || runtime.GOARCH == "riscv64" || runtime.GOARCH == "s390x" { // internal/runtime/atomic.Loaduintptr is only intrinsified on these platforms. diff --git a/src/cmd/compile/internal/types/pkg.go b/src/cmd/compile/internal/types/pkg.go index c6ce7889af..9f64b84db4 100644 --- a/src/cmd/compile/internal/types/pkg.go +++ b/src/cmd/compile/internal/types/pkg.go @@ -16,7 +16,7 @@ import ( var pkgMap = make(map[string]*Pkg) type Pkg struct { - Path string // string literal used in import statement, e.g. "runtime/internal/sys" + Path string // string literal used in import statement, e.g. "internal/runtime/sys" Name string // package name, e.g. "sys" Prefix string // escaped path for use in symbol table Syms map[string]*Sym diff --git a/src/cmd/compile/internal/types/type.go b/src/cmd/compile/internal/types/type.go index 88052dc97b..41fdefe830 100644 --- a/src/cmd/compile/internal/types/type.go +++ b/src/cmd/compile/internal/types/type.go @@ -1650,7 +1650,7 @@ func NewNamed(obj Object) *Type { t.SetIsShape(true) t.SetHasShape(true) } - if sym.Pkg.Path == "runtime/internal/sys" && sym.Name == "nih" { + if sym.Pkg.Path == "internal/runtime/sys" && sym.Name == "nih" { // Recognize the special not-in-heap type. Any type including // this type will also be not-in-heap. // This logic is duplicated in go/types and diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go index c033beabdb..910d5290e5 100644 --- a/src/cmd/dist/build.go +++ b/src/cmd/dist/build.go @@ -639,7 +639,7 @@ var gentab = []struct { }{ {"go/build", "zcgo.go", mkzcgo}, {"cmd/go/internal/cfg", "zdefaultcc.go", mkzdefaultcc}, - {"runtime/internal/sys", "zversion.go", mkzversion}, + {"internal/runtime/sys", "zversion.go", mkzversion}, {"time/tzdata", "zzipdata.go", mktzdata}, } @@ -1707,7 +1707,7 @@ func checkNotStale(env []string, goBinary string, targets ...string) { out := runEnv(workdir, CheckExit, env, append(goCmd, targets...)...) if strings.Contains(out, "\tSTALE ") { os.Setenv("GODEBUG", "gocachehash=1") - for _, target := range []string{"runtime/internal/sys", "cmd/dist", "cmd/link"} { + for _, target := range []string{"internal/runtime/sys", "cmd/dist", "cmd/link"} { if strings.Contains(out, "STALE "+target) { run(workdir, ShowOutput|CheckExit, goBinary, "list", "-f={{.ImportPath}} {{.Stale}}", target) break diff --git a/src/cmd/distpack/pack.go b/src/cmd/distpack/pack.go index 5525249366..a4f18da8bd 100644 --- a/src/cmd/distpack/pack.go +++ b/src/cmd/distpack/pack.go @@ -132,7 +132,7 @@ func main() { // Generated during cmd/dist. See ../dist/build.go:/gentab. "src/cmd/go/internal/cfg/zdefaultcc.go", "src/go/build/zcgo.go", - "src/runtime/internal/sys/zversion.go", + "src/internal/runtime/sys/zversion.go", "src/time/tzdata/zzipdata.go", // Generated during cmd/dist by bootstrapBuildTools. diff --git a/src/cmd/distpack/test.go b/src/cmd/distpack/test.go index 22b54b5fe1..108907d0e6 100644 --- a/src/cmd/distpack/test.go +++ b/src/cmd/distpack/test.go @@ -35,7 +35,7 @@ var srcRules = []testRule{ {name: "go/pkg/**", exclude: true}, {name: "go/src/cmd/dist/dist", exclude: true}, {name: "go/src/cmd/dist/dist.exe", exclude: true}, - {name: "go/src/runtime/internal/sys/zversion.go", exclude: true}, + {name: "go/src/internal/runtime/sys/zversion.go", exclude: true}, {name: "go/src/time/tzdata/zzipdata.go", exclude: true}, } diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go index b45a905880..5720a397f7 100644 --- a/src/cmd/go/go_test.go +++ b/src/cmd/go/go_test.go @@ -943,14 +943,14 @@ func TestNewReleaseRebuildsStalePackagesInGOPATH(t *testing.T) { tg.run("install", "p1") tg.wantNotStale("p1", "", "./testgo list claims p1 is stale, incorrectly, before any changes") - // Changing mtime of runtime/internal/sys/sys.go + // Changing mtime of internal/runtime/sys/sys.go // should have no effect: only the content matters. // In fact this should be true even outside a release branch. - sys := tg.path("goroot/src/runtime/internal/sys/sys.go") + sys := tg.path("goroot/src/internal/runtime/sys/sys.go") tg.sleep() restore := addVar(sys, 0) restore() - tg.wantNotStale("p1", "", "./testgo list claims p1 is stale, incorrectly, after updating mtime of runtime/internal/sys/sys.go") + tg.wantNotStale("p1", "", "./testgo list claims p1 is stale, incorrectly, after updating mtime of internal/runtime/sys/sys.go") // But changing content of any file should have an effect. // Previously zversion.go was the only one that mattered; diff --git a/src/cmd/internal/objabi/pkgspecial.go b/src/cmd/internal/objabi/pkgspecial.go index 2772226c93..f288096a02 100644 --- a/src/cmd/internal/objabi/pkgspecial.go +++ b/src/cmd/internal/objabi/pkgspecial.go @@ -48,7 +48,7 @@ var runtimePkgs = []string{ "internal/runtime/atomic", "internal/runtime/exithook", "internal/runtime/math", - "runtime/internal/sys", + "internal/runtime/sys", "internal/runtime/syscall", "internal/abi", diff --git a/src/cmd/internal/objabi/stack.go b/src/cmd/internal/objabi/stack.go index 7c7ff4e058..d50a7c1afd 100644 --- a/src/cmd/internal/objabi/stack.go +++ b/src/cmd/internal/objabi/stack.go @@ -18,7 +18,7 @@ func StackNosplit(race bool) int { // stack guard size. Larger multipliers are used for non-optimized // builds that have larger stack frames or for specific targets. func stackGuardMultiplier(race bool) int { - // This arithmetic must match that in runtime/internal/sys/consts.go:StackGuardMultiplier. + // This arithmetic must match that in internal/runtime/sys/consts.go:StackGuardMultiplier. n := 1 // On AIX, a larger stack is needed for syscalls. if buildcfg.GOOS == "aix" { |
