diff options
author | Austin Clements <austin@google.com> | 2021-04-06 13:35:48 -0400 |
---|---|---|
committer | Austin Clements <austin@google.com> | 2021-04-08 02:17:18 +0000 |
commit | b675e52e9592ba3db1a3cf2dc9c4bc02c89e03a8 (patch) | |
tree | 9caaf1b6ffc880af66b87c6598603d9087e17f17 /src/runtime/proc.go | |
parent | 6304b401e4bcfc1d61dd687bb5b7df13fd71033b (diff) | |
download | go-b675e52e9592ba3db1a3cf2dc9c4bc02c89e03a8.tar.gz go-b675e52e9592ba3db1a3cf2dc9c4bc02c89e03a8.zip |
internal/goexperiment: consolidate experiment-enabled constants
Currently, we have boolean and integral constants for GOEXPERIMENTs in
various places. Consolidate these into automatically generated
constants in the internal/goexperiment package.
Change-Id: I42a49aba2a3b4c722fedea23a613162cd8a67bee
Reviewed-on: https://go-review.googlesource.com/c/go/+/307818
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/runtime/proc.go')
-rw-r--r-- | src/runtime/proc.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go index 583ed73d84..35a3f9ca19 100644 --- a/src/runtime/proc.go +++ b/src/runtime/proc.go @@ -6,6 +6,7 @@ package runtime import ( "internal/cpu" + "internal/goexperiment" "runtime/internal/atomic" "runtime/internal/sys" "unsafe" @@ -4021,8 +4022,8 @@ func malg(stacksize int32) *g { // //go:nosplit func newproc(siz int32, fn *funcval) { - if experimentRegabiDefer && siz != 0 { - // TODO: When we commit to experimentRegabiDefer, + if goexperiment.RegabiDefer && siz != 0 { + // TODO: When we commit to GOEXPERIMENT=regabidefer, // rewrite newproc's comment, since it will no longer // have a funny stack layout or need to be nosplit. throw("go with non-empty frame") |