]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.typeparams] runtime/internal/sys: replace uses of GOARCH with goarch.GOARCH
authorMichael Anthony Knyszek <mknyszek@google.com>
Wed, 16 Jun 2021 21:11:32 +0000 (21:11 +0000)
committerMichael Knyszek <mknyszek@google.com>
Thu, 17 Jun 2021 20:42:01 +0000 (20:42 +0000)
Refactoring performed by the rf tool:

    rf 'ex . {
import "internal/goarch"
import "runtime/internal/sys"
sys.GOARCH -> goarch.GOARCH
    }'

Change-Id: I4b0246bf4e734f08313c6fff7b547db362057714
Reviewed-on: https://go-review.googlesource.com/c/go/+/328338
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/runtime/extern.go
src/runtime/heapdump.go
src/runtime/internal/sys/consts.go

index 48e1e6603b7aeb179bdf627c801f91665e3106b0..1c70e8a3618152627b6853611f9a44f2fd28ac3e 100644 (file)
@@ -186,7 +186,10 @@ of the run-time system.
 */
 package runtime
 
-import "runtime/internal/sys"
+import (
+       "internal/goarch"
+       "runtime/internal/sys"
+)
 
 // Caller reports file and line number information about function invocations on
 // the calling goroutine's stack. The argument skip is the number of stack frames
@@ -264,4 +267,4 @@ const GOOS string = sys.GOOS
 
 // GOARCH is the running program's architecture target:
 // one of 386, amd64, arm, s390x, and so on.
-const GOARCH string = sys.GOARCH
+const GOARCH string = goarch.GOARCH
index 050628e33e38c7c00481af7df556341bd7380061..18e4666fa403ea0536a819b4819ffd65ced64f28 100644 (file)
@@ -12,7 +12,6 @@
 package runtime
 
 import (
-       "runtime/internal/sys"
        "internal/goarch"
        "unsafe"
 )
@@ -532,7 +531,7 @@ func dumpparams() {
        }
        dumpint(uint64(arenaStart))
        dumpint(uint64(arenaEnd))
-       dumpstr(sys.GOARCH)
+       dumpstr(goarch.GOARCH)
        dumpstr(buildVersion)
        dumpint(uint64(ncpu))
 }
index 349d2ed4d656d5904e4433590df109bb17cdce1d..07fbaf4d73c4a4a4f6967b7a38f8d6f5f030ab42 100644 (file)
@@ -54,8 +54,6 @@ const MinFrameSize = goarch.MinFrameSize
 // The stack must be at least word aligned, but some architectures require more.
 const StackAlign = goarch.StackAlign
 
-const GOARCH = goarch.GOARCH
-
 const (
        Goarch386         = goarch.Goarch386
        GoarchAmd64       = goarch.GoarchAmd64