]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: move FuncPC intrinsic handling to common helper
authorMichael Pratt <mpratt@google.com>
Fri, 3 Nov 2023 20:00:40 +0000 (16:00 -0400)
committerGopher Robot <gobot@golang.org>
Fri, 10 Nov 2023 20:33:58 +0000 (20:33 +0000)
commite323e7d973cbc0fb979bee35baa606b72f38b408
tree321a4f46af79f3a9dcbf8bb574914c18625f3857
parent505dff4fe260cc0b92482cfcf6d4dce233d2b10d
cmd/compile: move FuncPC intrinsic handling to common helper

CL 539699 will need to do the equivalent of
internal/abi.FuncPCABIInternal to get the PC of a function value for the
runtime devirtualization check.

Move the FuncPC expression creation from the depths of walk to a
typecheck helper so it can be reused in both places.

For #61577.

Change-Id: I76f333157cf0e5fd867b41bfffcdaf6f45254707
Reviewed-on: https://go-review.googlesource.com/c/go/+/539698
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/compile/internal/ir/func.go
src/cmd/compile/internal/walk/expr.go
src/cmd/compile/internal/walk/order.go