aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/base
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2021-03-16 17:06:25 -0400
committerAustin Clements <austin@google.com>2021-03-18 21:27:23 +0000
commit0c93b16d015663a60ac77900ca0dcfab92310790 (patch)
tree7069fdf188813c159797e9a2edea5d0f91943d7a /src/cmd/compile/internal/base
parentd3ab6b50496a58ff3deb2502b6c8b9b38947eeca (diff)
downloadgo-0c93b16d015663a60ac77900ca0dcfab92310790.tar.gz
go-0c93b16d015663a60ac77900ca0dcfab92310790.zip
cmd: move experiment flags into objabi.Experiment
This moves all remaining GOEXPERIMENT flags into the objabi.Experiment struct, drops the "_enabled" from their name, and makes them all bool typed. We also drop DebugFlags.Fieldtrack because the previous CL shifted the one test that used it to use GOEXPERIMENT instead. Change-Id: I3406fe62b1c300bb4caeaffa6ca5ce56a70497fe Reviewed-on: https://go-review.googlesource.com/c/go/+/302389 Trust: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/base')
-rw-r--r--src/cmd/compile/internal/base/debug.go9
-rw-r--r--src/cmd/compile/internal/base/flag.go2
2 files changed, 2 insertions, 9 deletions
diff --git a/src/cmd/compile/internal/base/debug.go b/src/cmd/compile/internal/base/debug.go
index b9fa3d882e..7590dc1bfa 100644
--- a/src/cmd/compile/internal/base/debug.go
+++ b/src/cmd/compile/internal/base/debug.go
@@ -13,14 +13,10 @@ import (
"reflect"
"strconv"
"strings"
-
- "cmd/internal/objabi"
)
// Debug holds the parsed debugging configuration values.
-var Debug = DebugFlags{
- Fieldtrack: &objabi.Fieldtrack_enabled,
-}
+var Debug DebugFlags
// DebugFlags defines the debugging configuration values (see var Debug).
// Each struct field is a different value, named for the lower-case of the field name.
@@ -38,7 +34,6 @@ type DebugFlags struct {
DumpPtrs int `help:"show Node pointers values in dump output"`
DwarfInl int `help:"print information about DWARF inlined function creation"`
Export int `help:"print export data"`
- Fieldtrack *int `help:"enable field tracking"`
GCProg int `help:"print dump of GC programs"`
InlFuncsWithClosures int `help:"allow functions with closures to be inlined"`
Libfuzzer int `help:"enable coverage instrumentation for libfuzzer"`
@@ -86,8 +81,6 @@ func init() {
panic(fmt.Sprintf("base.Debug.%s has invalid type %v (must be int or string)", f.Name, f.Type))
case *int, *string:
// ok
- case **int:
- ptr = *ptr.(**int) // record the *int itself
}
debugTab = append(debugTab, debugField{name, help, ptr})
}
diff --git a/src/cmd/compile/internal/base/flag.go b/src/cmd/compile/internal/base/flag.go
index 959fededa9..751ab1b5c7 100644
--- a/src/cmd/compile/internal/base/flag.go
+++ b/src/cmd/compile/internal/base/flag.go
@@ -339,7 +339,7 @@ func concurrentBackendAllowed() bool {
return false
}
// TODO: Test and delete this condition.
- if objabi.Fieldtrack_enabled != 0 {
+ if objabi.Experiment.FieldTrack {
return false
}
// TODO: fix races and enable the following flags