diff options
| author | Cherry Mui <cherryyz@google.com> | 2022-03-16 12:12:50 -0400 |
|---|---|---|
| committer | Cherry Mui <cherryyz@google.com> | 2022-03-18 15:17:37 +0000 |
| commit | d8bee94be2fc2afa6418f0bf2d474c103d38c094 (patch) | |
| tree | b13ecfa8100041787c4af29768cd272c9fc514ab /src/runtime/debug_test.go | |
| parent | 3684abbf6c82d7f151a30cce6f435ee203908b2c (diff) | |
| download | go-d8bee94be2fc2afa6418f0bf2d474c103d38c094.tar.xz | |
reflect, runtime: drop RegabiArgs conditions
With the previous CL, internal/abi.IntArgRegs and FloatArgRegs
is controlled by RegabiArgs (or always enabled), so there is no
need to check for that goexperiment.
There are a few places we guard register-ABI specific code and
tests with the RegabiArgs flag. Switch to checking for the number
of argument registers instead.
Change-Id: I79fff9fd1e919684ffaf73aba9e7e85d5a9e1629
Reviewed-on: https://go-review.googlesource.com/c/go/+/393363
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime/debug_test.go')
| -rw-r--r-- | src/runtime/debug_test.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/runtime/debug_test.go b/src/runtime/debug_test.go index 5bb0c5cee3..7698eacb59 100644 --- a/src/runtime/debug_test.go +++ b/src/runtime/debug_test.go @@ -16,7 +16,6 @@ package runtime_test import ( "fmt" "internal/abi" - "internal/goexperiment" "math" "os" "regexp" @@ -144,7 +143,7 @@ func TestDebugCall(t *testing.T) { intRegs := regs.Ints[:] floatRegs := regs.Floats[:] fval := float64(42.0) - if goexperiment.RegabiArgs { + if len(intRegs) > 0 { intRegs[0] = 42 floatRegs[0] = math.Float64bits(fval) } else { @@ -159,7 +158,7 @@ func TestDebugCall(t *testing.T) { } var result0 int var result1 float64 - if goexperiment.RegabiArgs { + if len(intRegs) > 0 { result0 = int(intRegs[0]) result1 = math.Float64frombits(floatRegs[0]) } else { |
