aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssagen
diff options
context:
space:
mode:
authorDavid Chase <drchase@google.com>2021-03-09 20:43:49 -0500
committerDavid Chase <drchase@google.com>2021-05-06 11:58:39 +0000
commitb4ca1cec69f8248b77d8d8ce019943ced5235ed0 (patch)
treea50d6cbba00b63315b7b22e7ea51b4bb3d8a093e /src/cmd/compile/internal/ssagen
parent1108cbe60b87196ce739ff8bce08c9862d6b61f0 (diff)
downloadgo-b4ca1cec69f8248b77d8d8ce019943ced5235ed0.tar.gz
go-b4ca1cec69f8248b77d8d8ce019943ced5235ed0.zip
cmd/compile: set unsayable "names" for regabi testing triggers
This disables the "testing names" for method names and trailing input types passed to closure/interface/other calls. The logic using the names remains, so that editing the change to enable local testing is not too hard. Also fixes broken build tag in reflect/abi_test.go Updates #44816. Change-Id: I3d222d2473c98d04ab6f1122ede9fea70c994af1 Reviewed-on: https://go-review.googlesource.com/c/go/+/300150 Trust: David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssagen')
-rw-r--r--src/cmd/compile/internal/ssagen/ssa.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/ssagen/ssa.go b/src/cmd/compile/internal/ssagen/ssa.go
index c65e738188..75973c46a6 100644
--- a/src/cmd/compile/internal/ssagen/ssa.go
+++ b/src/cmd/compile/internal/ssagen/ssa.go
@@ -223,9 +223,10 @@ func AbiForBodylessFuncStackMap(fn *ir.Func) *abi.ABIConfig {
return ssaConfig.ABI0.Copy() // No idea what races will result, be safe
}
-// TODO (NLT 2021-04-15) This must be changed to a name that cannot match; it may be helpful to other register ABI work to keep the trigger-logic
-const magicNameDotSuffix = ".MagicMethodNameForTestingRegisterABI"
-const magicLastTypeName = "MagicLastTypeNameForTestingRegisterABI"
+// These are disabled but remain ready for use in case they are needed for the next regabi port.
+// TODO if they are not needed for 1.18 / next register abi port, delete them.
+const magicNameDotSuffix = ".*disabled*MagicMethodNameForTestingRegisterABI"
+const magicLastTypeName = "*disabled*MagicLastTypeNameForTestingRegisterABI"
// abiForFunc implements ABI policy for a function, but does not return a copy of the ABI.
// Passing a nil function returns the default ABI based on experiment configuration.