• Matthew Dempsky's avatar
    cmd/compile: fix //go:uintptrescapes for basic method calls · b3bd7ab3
    Matthew Dempsky authored
    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: default avatarKeith Randall <khr@golang.org>
    b3bd7ab3
uintptrescapes3.go 1.28 KB