From: Keith Randall Date: Fri, 24 Sep 2021 22:07:59 +0000 (-0700) Subject: cmd/compile: leave dictionary argument out of traceback argument list X-Git-Tag: go1.18beta1~1173 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=315cec25bc7b5045f6081545a63cb27d44fcbde9;p=gostls13.git cmd/compile: leave dictionary argument out of traceback argument list 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 Trust: Dan Scales Run-TryBot: Keith Randall TryBot-Result: Go Bot Reviewed-by: Dan Scales --- diff --git a/src/cmd/compile/internal/ssagen/ssa.go b/src/cmd/compile/internal/ssagen/ssa.go index baf7242f4a..56fc191e5a 100644 --- a/src/cmd/compile/internal/ssagen/ssa.go +++ b/src/cmd/compile/internal/ssagen/ssa.go @@ -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 }