]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: cleanup nodpc and nodfp
authorMatthew Dempsky <mdempsky@google.com>
Thu, 8 Mar 2018 09:50:36 +0000 (01:50 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 8 Mar 2018 18:22:29 +0000 (18:22 +0000)
commitdcac984b97470c4f047f0d3d87b0af40f5246ed2
tree174cc92c52ce3618f517e6a0ef2ada02e6b090c8
parent6a5cfa8b63fcea71da941a60036ce3c6f22d8764
cmd/compile: cleanup nodpc and nodfp

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: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/builtin.go
src/cmd/compile/internal/gc/builtin/runtime.go
src/cmd/compile/internal/gc/esc.go
src/cmd/compile/internal/gc/go.go
src/cmd/compile/internal/gc/pgen.go
src/cmd/compile/internal/gc/racewalk.go
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/gc/universe.go
src/cmd/compile/internal/gc/walk.go