aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2021-06-16 21:11:32 +0000
committerMichael Knyszek <mknyszek@google.com>2021-06-17 20:42:01 +0000
commit5c028751bde57d069bd0fe4c6769cba11c975d31 (patch)
treec4bca57d1333f2a6ffcf204f31a7ff0e58b13132 /src/runtime
parent6d89c90fb166bf5c58fff33716ba632b67e9c182 (diff)
downloadgo-5c028751bde57d069bd0fe4c6769cba11c975d31.tar.xz
[dev.typeparams] runtime/internal/sys: replace uses of GOARCH with goarch.GOARCH
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>
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/extern.go7
-rw-r--r--src/runtime/heapdump.go3
-rw-r--r--src/runtime/internal/sys/consts.go2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/runtime/extern.go b/src/runtime/extern.go
index 48e1e6603b..1c70e8a361 100644
--- a/src/runtime/extern.go
+++ b/src/runtime/extern.go
@@ -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
diff --git a/src/runtime/heapdump.go b/src/runtime/heapdump.go
index 050628e33e..18e4666fa4 100644
--- a/src/runtime/heapdump.go
+++ b/src/runtime/heapdump.go
@@ -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))
}
diff --git a/src/runtime/internal/sys/consts.go b/src/runtime/internal/sys/consts.go
index 349d2ed4d6..07fbaf4d73 100644
--- a/src/runtime/internal/sys/consts.go
+++ b/src/runtime/internal/sys/consts.go
@@ -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