From: Michael Pratt Date: Mon, 16 Sep 2024 18:14:27 +0000 (-0400) Subject: runtime: remove go:noescape from getcallerpc/sp X-Git-Tag: go1.24rc1~893 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a02516a3797571b5c88b0fc44a225daf401ab457;p=gostls13.git runtime: remove go:noescape from getcallerpc/sp getcallerpc and getcallerps dropped their arguments in CL 65474 and CL 109596, respectively. Without an argument there is nothing to escape. Change-Id: I24f300d039a2a0615ca0c3ea247125676a6237d1 Reviewed-on: https://go-review.googlesource.com/c/go/+/613497 LUCI-TryBot-Result: Go LUCI Reviewed-by: Cherry Mui Auto-Submit: Michael Pratt --- diff --git a/src/runtime/stubs.go b/src/runtime/stubs.go index 2c3c5e3541..0cc404f030 100644 --- a/src/runtime/stubs.go +++ b/src/runtime/stubs.go @@ -309,8 +309,7 @@ func publicationBarrier() // getcallerpc returns the program counter (PC) of its caller's caller. // getcallersp returns the stack pointer (SP) of its caller's caller. -// The implementation may be a compiler intrinsic; there is not -// necessarily code implementing this on every platform. +// Both are implemented as intrinsics on every platform. // // For example: // @@ -331,11 +330,9 @@ func publicationBarrier() // A general rule is that the result of getcallersp should be used // immediately and can only be passed to nosplit functions. -//go:noescape func getcallerpc() uintptr -//go:noescape -func getcallersp() uintptr // implemented as an intrinsic on all platforms +func getcallersp() uintptr // getclosureptr returns the pointer to the current closure. // getclosureptr can only be used in an assignment statement