diff options
| author | Austin Clements <austin@google.com> | 2022-08-16 13:04:16 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-09-02 19:04:51 +0000 |
| commit | 5063056bd19698a92da3fd69c34ee784af62b03e (patch) | |
| tree | 23ca159c89f7ec69e1672a810efed90e4895839b /src/runtime | |
| parent | 8be94b82ab1832ec8a07bcb16a0cb3872915dbb7 (diff) | |
| download | go-5063056bd19698a92da3fd69c34ee784af62b03e.tar.xz | |
runtime: drop redundant argument to getArgInfo
The f funcInfo argument is always the same as frame.fn, so we don't
need to pass it. I suspect that was there to make the signatures of
getArgInfoFast and getArgInfo more similar, but it's not necessary.
For #54466.
Change-Id: Idc717f4df09e97cad49d52c5b7edf28090908cba
Reviewed-on: https://go-review.googlesource.com/c/go/+/424255
Run-TryBot: Austin Clements <austin@google.com>
Auto-Submit: Austin Clements <austin@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/traceback.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/runtime/traceback.go b/src/runtime/traceback.go index 27ac7b0977..ed64343470 100644 --- a/src/runtime/traceback.go +++ b/src/runtime/traceback.go @@ -294,7 +294,7 @@ func gentraceback(pc0, sp0, lr0 uintptr, gp *g, skip int, pcbuf *uintptr, max in var ok bool frame.arglen, frame.argmap, ok = getArgInfoFast(f, callback != nil) if !ok { - frame.arglen, frame.argmap = getArgInfo(&frame, f, callback != nil) + frame.arglen, frame.argmap = getArgInfo(&frame, callback != nil) } } @@ -679,7 +679,8 @@ func getArgInfoFast(f funcInfo, needArgMap bool) (arglen uintptr, argmap *bitvec // getArgInfo returns the argument frame information for a call to f // with call frame frame. -func getArgInfo(frame *stkframe, f funcInfo, needArgMap bool) (arglen uintptr, argmap *bitvector) { +func getArgInfo(frame *stkframe, needArgMap bool) (arglen uintptr, argmap *bitvector) { + f := frame.fn arglen = uintptr(f.args) if needArgMap && f.args == _ArgsSizeUnknown { // Extract argument bitmaps for reflect stubs from the calls they made to reflect. |
