]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: leave dictionary argument out of traceback argument list
authorKeith Randall <khr@golang.org>
Fri, 24 Sep 2021 22:07:59 +0000 (15:07 -0700)
committerKeith Randall <khr@golang.org>
Mon, 27 Sep 2021 19:42:34 +0000 (19:42 +0000)
The dictionary argument is implicit; the user doesn't need to see it.

Update #48578

Change-Id: I367ba4b6622119d3e01aaded90463d16823915a7
Reviewed-on: https://go-review.googlesource.com/c/go/+/352119
Trust: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
src/cmd/compile/internal/ssagen/ssa.go

index baf7242f4abc495a7b461eaab49a7efa8da288d9..56fc191e5aad8639bdf6b1a5213c038bf08fcde4 100644 (file)
@@ -6664,7 +6664,13 @@ func EmitArgInfo(f *ir.Func, abiInfo *abi.ABIParamResultInfo) *obj.LSym {
                return true
        }
 
-       for _, a := range abiInfo.InParams() {
+       start := 0
+       if strings.Contains(f.LSym.Name, "[") {
+               // Skip the dictionary argument - it is implicit and the user doesn't need to see it.
+               start = 1
+       }
+
+       for _, a := range abiInfo.InParams()[start:] {
                if !visitType(a.FrameOffset(abiInfo), a.Type, 0) {
                        break
                }