]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix //go:uintptrescapes for basic method calls
authorMatthew Dempsky <mdempsky@google.com>
Tue, 1 Oct 2019 18:22:07 +0000 (11:22 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 5 Nov 2019 00:26:30 +0000 (00:26 +0000)
commitb3bd7ab3d76c694bd87dfa31f9e7ccef15ed90a7
tree907bad812817534aacf6622f9134d95f4df08d02
parent6cbd737c8e4a5aa5a8e85895c5ee6ff53a358622
cmd/compile: fix //go:uintptrescapes for basic method calls

The logic for keeping arguments alive for calls to //go:uintptrescapes
functions was only applying to direct function calls. This CL changes
it to also apply to direct method calls, which should address most
uses of Proc.Call and LazyProc.Call.

It's still an open question (#34684) whether other call forms (e.g.,
method expressions, or indirect calls via function values, method
values, or interfaces).

Fixes #34474.

Change-Id: I874f97145972b0e237a4c9e8926156298f4d6ce0
Reviewed-on: https://go-review.googlesource.com/c/go/+/198043
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/order.go
test/uintptrescapes2.go
test/uintptrescapes3.go [new file with mode: 0644]