mirror of
https://github.com/golang/go
synced 2024-11-21 21:44:40 -07:00
runtime,internal: move runtime/internal/sys to internal/runtime/sys
Cleanup and friction reduction For #65355. Change-Id: Ia14c9dc584a529a35b97801dd3e95b9acc99a511 Reviewed-on: https://go-review.googlesource.com/c/go/+/600436 Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
f9eb3e3cd5
commit
fc5073bc15
2
.gitignore
vendored
2
.gitignore
vendored
@ -37,7 +37,7 @@ _testmain.go
|
||||
/src/go/build/zcgo.go
|
||||
/src/go/doc/headscan
|
||||
/src/internal/buildcfg/zbootstrap.go
|
||||
/src/runtime/internal/sys/zversion.go
|
||||
/src/internal/runtime/sys/zversion.go
|
||||
/src/unicode/maketables
|
||||
/src/time/tzdata/zzipdata.go
|
||||
/test.out
|
||||
|
@ -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()
|
||||
|
@ -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 ********/
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
4
src/cmd/dist/build.go
vendored
4
src/cmd/dist/build.go
vendored
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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},
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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",
|
||||
|
@ -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" {
|
||||
|
@ -83,7 +83,7 @@ var depsRules = `
|
||||
< internal/stringslite
|
||||
< internal/itoa
|
||||
< internal/unsafeheader
|
||||
< runtime/internal/sys
|
||||
< internal/runtime/sys
|
||||
< internal/runtime/syscall
|
||||
< internal/runtime/atomic
|
||||
< internal/runtime/exithook
|
||||
|
@ -26,7 +26,7 @@ package coverage
|
||||
// slot: 1 path='internal/goarch' hard-coded id: 2
|
||||
// slot: 2 path='internal/runtime/atomic' hard-coded id: 3
|
||||
// slot: 3 path='internal/goos'
|
||||
// slot: 4 path='runtime/internal/sys' hard-coded id: 5
|
||||
// slot: 4 path='internal/runtime/sys' hard-coded id: 5
|
||||
// slot: 5 path='internal/abi' hard-coded id: 4
|
||||
// slot: 6 path='internal/runtime/math' hard-coded id: 6
|
||||
// slot: 7 path='internal/bytealg' hard-coded id: 7
|
||||
@ -50,7 +50,7 @@ var rtPkgs = [...]string{
|
||||
"internal/runtime/atomic",
|
||||
"internal/goos",
|
||||
"internal/chacha8rand",
|
||||
"runtime/internal/sys",
|
||||
"internal/runtime/sys",
|
||||
"internal/abi",
|
||||
"internal/runtime/math",
|
||||
"internal/bytealg",
|
||||
|
@ -5,7 +5,7 @@
|
||||
package sys_test
|
||||
|
||||
import (
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"testing"
|
||||
)
|
||||
|
@ -41,7 +41,7 @@ func deepValueEqual(v1, v2 Value, visited map[visit]bool) bool {
|
||||
case Pointer:
|
||||
if !v1.typ().Pointers() {
|
||||
// not-in-heap pointers can't be cyclic.
|
||||
// At least, all of our current uses of runtime/internal/sys.NotInHeap
|
||||
// At least, all of our current uses of internal/runtime/sys.NotInHeap
|
||||
// have that property. The runtime ones aren't cyclic (and we don't use
|
||||
// DeepEqual on them anyway), and the cgo-generated ones are
|
||||
// all empty structs.
|
||||
|
@ -235,7 +235,7 @@ There are three mechanisms for allocating unmanaged memory:
|
||||
objects of the same type.
|
||||
|
||||
In general, types that are allocated using any of these should be
|
||||
marked as not in heap by embedding `runtime/internal/sys.NotInHeap`.
|
||||
marked as not in heap by embedding `internal/runtime/sys.NotInHeap`.
|
||||
|
||||
Objects that are allocated in unmanaged memory **must not** contain
|
||||
heap pointers unless the following rules are also obeyed:
|
||||
|
@ -87,7 +87,7 @@ import (
|
||||
"internal/goarch"
|
||||
"internal/runtime/atomic"
|
||||
"internal/runtime/math"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -32,7 +32,7 @@ package cgo
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import "runtime/internal/sys"
|
||||
import "internal/runtime/sys"
|
||||
|
||||
// Incomplete is used specifically for the semantics of incomplete C types.
|
||||
type Incomplete struct {
|
||||
|
@ -88,7 +88,7 @@ import (
|
||||
"internal/abi"
|
||||
"internal/goarch"
|
||||
"internal/goexperiment"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -14,7 +14,7 @@ package runtime
|
||||
|
||||
import (
|
||||
"internal/abi"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -18,7 +18,7 @@ package runtime
|
||||
import (
|
||||
"internal/abi"
|
||||
"internal/runtime/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
"internal/goarch"
|
||||
"internal/goos"
|
||||
"internal/runtime/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -6,7 +6,7 @@ package runtime
|
||||
|
||||
import (
|
||||
"internal/runtime/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"internal/abi"
|
||||
"internal/goarch"
|
||||
"internal/runtime/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -105,7 +105,7 @@ import (
|
||||
"internal/goos"
|
||||
"internal/runtime/atomic"
|
||||
"internal/runtime/math"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
@ -1555,7 +1555,7 @@ var persistentChunks *notInHeap
|
||||
// sysStat must be non-nil.
|
||||
//
|
||||
// Consider marking persistentalloc'd types not in heap by embedding
|
||||
// runtime/internal/sys.NotInHeap.
|
||||
// internal/runtime/sys.NotInHeap.
|
||||
func persistentalloc(size, align uintptr, sysStat *sysMemStat) unsafe.Pointer {
|
||||
var p *notInHeap
|
||||
systemstack(func() {
|
||||
@ -1697,7 +1697,7 @@ func (l *linearAlloc) alloc(size, align uintptr, sysStat *sysMemStat) unsafe.Poi
|
||||
// like sysAlloc or persistentAlloc.
|
||||
//
|
||||
// In general, it's better to use real types which embed
|
||||
// runtime/internal/sys.NotInHeap, but this serves as a generic type
|
||||
// internal/runtime/sys.NotInHeap, but this serves as a generic type
|
||||
// for situations where that isn't possible (like in the allocators).
|
||||
//
|
||||
// TODO: Use this as the return type of sysAlloc, persistentAlloc, etc?
|
||||
|
@ -59,7 +59,7 @@ import (
|
||||
"internal/abi"
|
||||
"internal/goarch"
|
||||
"internal/runtime/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -6,7 +6,7 @@ package runtime
|
||||
|
||||
import (
|
||||
"internal/runtime/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -14,7 +14,7 @@ package runtime
|
||||
|
||||
import (
|
||||
"internal/runtime/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
)
|
||||
|
||||
// Central list of free objects of a given size.
|
||||
|
@ -15,7 +15,7 @@ package runtime
|
||||
import (
|
||||
"internal/goarch"
|
||||
"internal/runtime/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
"internal/abi"
|
||||
"internal/goarch"
|
||||
"internal/runtime/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
package runtime
|
||||
|
||||
import (
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
@ -27,7 +27,7 @@ import (
|
||||
// smashed by freeing and reallocating.
|
||||
//
|
||||
// Consider marking fixalloc'd types not in heap by embedding
|
||||
// runtime/internal/sys.NotInHeap.
|
||||
// internal/runtime/sys.NotInHeap.
|
||||
type fixalloc struct {
|
||||
size uintptr
|
||||
first func(arg, p unsafe.Pointer) // called first time p is returned
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
"internal/abi"
|
||||
"internal/goarch"
|
||||
"internal/runtime/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -93,7 +93,7 @@ package runtime
|
||||
import (
|
||||
"internal/goos"
|
||||
"internal/runtime/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -96,7 +96,7 @@ package runtime
|
||||
|
||||
import (
|
||||
"internal/goarch"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -7,7 +7,7 @@ package runtime
|
||||
import (
|
||||
"internal/goarch"
|
||||
"internal/runtime/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -12,7 +12,7 @@ import (
|
||||
"internal/cpu"
|
||||
"internal/goarch"
|
||||
"internal/runtime/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
package runtime
|
||||
|
||||
import (
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
package runtime
|
||||
|
||||
import (
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
)
|
||||
|
||||
// pageBits is a bitmap representing one bit per page in a palloc chunk.
|
||||
|
@ -12,7 +12,7 @@ import (
|
||||
"internal/goarch"
|
||||
"internal/profilerecord"
|
||||
"internal/runtime/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -8,7 +8,7 @@ package runtime
|
||||
|
||||
import (
|
||||
"internal/runtime/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
@ -714,7 +714,7 @@ func (c *pollCache) alloc() *pollDesc {
|
||||
// makeArg converts pd to an interface{}.
|
||||
// makeArg does not do any allocation. Normally, such
|
||||
// a conversion requires an allocation because pointers to
|
||||
// types which embed runtime/internal/sys.NotInHeap (which pollDesc is)
|
||||
// types which embed internal/runtime/sys.NotInHeap (which pollDesc is)
|
||||
// must be stored in interfaces indirectly. See issue 42076.
|
||||
func (pd *pollDesc) makeArg() (i any) {
|
||||
x := (*eface)(unsafe.Pointer(&i))
|
||||
|
@ -8,8 +8,8 @@ import (
|
||||
"internal/abi"
|
||||
"internal/goarch"
|
||||
"internal/runtime/atomic"
|
||||
"internal/runtime/sys"
|
||||
"internal/stringslite"
|
||||
"runtime/internal/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -11,8 +11,8 @@ import (
|
||||
"internal/goos"
|
||||
"internal/runtime/atomic"
|
||||
"internal/runtime/exithook"
|
||||
"internal/runtime/sys"
|
||||
"internal/stringslite"
|
||||
"runtime/internal/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
"internal/chacha8rand"
|
||||
"internal/goarch"
|
||||
"internal/runtime/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -9,7 +9,7 @@ package runtime
|
||||
import (
|
||||
"internal/abi"
|
||||
"internal/goarch"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -7,7 +7,7 @@ package runtime
|
||||
import (
|
||||
"internal/abi"
|
||||
"internal/goarch"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -8,7 +8,7 @@ package runtime
|
||||
|
||||
import (
|
||||
"internal/abi"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -8,7 +8,7 @@ package runtime
|
||||
|
||||
import (
|
||||
"internal/abi"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -9,7 +9,7 @@ package runtime
|
||||
import (
|
||||
"internal/abi"
|
||||
"internal/runtime/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -6,7 +6,7 @@ package runtime
|
||||
|
||||
import (
|
||||
"internal/abi"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"internal/abi"
|
||||
"internal/goarch"
|
||||
"internal/runtime/math"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
@ -18,7 +18,7 @@ type slice struct {
|
||||
cap int
|
||||
}
|
||||
|
||||
// A notInHeapSlice is a slice backed by runtime/internal/sys.NotInHeap memory.
|
||||
// A notInHeapSlice is a slice backed by internal/runtime/sys.NotInHeap memory.
|
||||
type notInHeapSlice struct {
|
||||
array *notInHeap
|
||||
len int
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
"internal/goarch"
|
||||
"internal/goos"
|
||||
"internal/runtime/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -7,7 +7,7 @@ package runtime
|
||||
import (
|
||||
"internal/abi"
|
||||
"internal/goarch"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"internal/abi"
|
||||
"internal/goarch"
|
||||
"internal/runtime/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -6,8 +6,8 @@ package runtime
|
||||
|
||||
import (
|
||||
"internal/abi"
|
||||
"internal/runtime/sys"
|
||||
"internal/stringslite"
|
||||
"runtime/internal/sys"
|
||||
)
|
||||
|
||||
func XTestInlineUnwinder(t TestingT) {
|
||||
|
@ -6,7 +6,7 @@ package runtime
|
||||
|
||||
import (
|
||||
"internal/goarch"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -9,7 +9,7 @@ package runtime
|
||||
import (
|
||||
"internal/abi"
|
||||
"internal/runtime/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -8,7 +8,7 @@ package runtime
|
||||
|
||||
import (
|
||||
"internal/abi"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
)
|
||||
|
||||
// Batch type values for the alloc/free experiment.
|
||||
|
@ -8,8 +8,8 @@ import (
|
||||
"internal/abi"
|
||||
"internal/bytealg"
|
||||
"internal/goarch"
|
||||
"internal/runtime/sys"
|
||||
"internal/stringslite"
|
||||
"runtime/internal/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
package runtime
|
||||
|
||||
import (
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -8,7 +8,7 @@ package runtime
|
||||
|
||||
import (
|
||||
"internal/abi"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
)
|
||||
|
||||
// Event types in the trace, args are given in square brackets.
|
||||
|
@ -19,7 +19,7 @@ import (
|
||||
"internal/cpu"
|
||||
"internal/goarch"
|
||||
"internal/runtime/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -8,7 +8,7 @@ package runtime
|
||||
|
||||
import (
|
||||
"internal/runtime/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/runtime/sys"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
@ -6,7 +6,7 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
T "runtime/internal/sys"
|
||||
T "internal/runtime/sys"
|
||||
)
|
||||
|
||||
var A = []uint64{0x0102030405060708, 0x1122334455667788}
|
||||
|
Loading…
Reference in New Issue
Block a user