Skip to content

Commit 5063056

Browse files
aclementsgopherbot
authored andcommitted
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 <[email protected]> Auto-Submit: Austin Clements <[email protected]> Reviewed-by: Michael Pratt <[email protected]> Reviewed-by: Cherry Mui <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 8be94b8 commit 5063056

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/runtime/traceback.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ func gentraceback(pc0, sp0, lr0 uintptr, gp *g, skip int, pcbuf *uintptr, max in
294294
var ok bool
295295
frame.arglen, frame.argmap, ok = getArgInfoFast(f, callback != nil)
296296
if !ok {
297-
frame.arglen, frame.argmap = getArgInfo(&frame, f, callback != nil)
297+
frame.arglen, frame.argmap = getArgInfo(&frame, callback != nil)
298298
}
299299
}
300300

@@ -679,7 +679,8 @@ func getArgInfoFast(f funcInfo, needArgMap bool) (arglen uintptr, argmap *bitvec
679679

680680
// getArgInfo returns the argument frame information for a call to f
681681
// with call frame frame.
682-
func getArgInfo(frame *stkframe, f funcInfo, needArgMap bool) (arglen uintptr, argmap *bitvector) {
682+
func getArgInfo(frame *stkframe, needArgMap bool) (arglen uintptr, argmap *bitvector) {
683+
f := frame.fn
683684
arglen = uintptr(f.args)
684685
if needArgMap && f.args == _ArgsSizeUnknown {
685686
// Extract argument bitmaps for reflect stubs from the calls they made to reflect.

0 commit comments

Comments
 (0)