mirror of
https://github.com/golang/go
synced 2024-11-18 15:04:44 -07:00
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>
This commit is contained in:
parent
8be94b82ab
commit
5063056bd1
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user