• Matthew Dempsky's avatar
    cmd/compile: cleanup nodpc and nodfp · dcac984b
    Matthew Dempsky authored
    Instead of creating a new &nodfp expression for every recover() call,
    or a new nodpc variable for every function instrumented by the race
    detector, this CL introduces two new uintptr-typed pseudo-variables
    callerSP and callerPC. These pseudo-variables act just like calls to
    the runtime's getcallersp() and getcallerpc() functions.
    
    For consistency, change runtime.gorecover's builtin stub's parameter
    type from "*int32" to "uintptr".
    
    Passes toolstash-check, but toolstash-check -race fails because of
    register allocator changes.
    
    Change-Id: I985d644653de2dac8b7b03a28829ad04dfd4f358
    Reviewed-on: https://go-review.googlesource.com/99416
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarDaniel Martí <mvdan@mvdan.cc>
    Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
    dcac984b
runtime.go 7.12 KB