]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/ir: add CallExpr.GoDefer
authorMatthew Dempsky <mdempsky@google.com>
Mon, 20 Nov 2023 04:18:50 +0000 (20:18 -0800)
committerGopher Robot <gobot@golang.org>
Mon, 20 Nov 2023 15:10:54 +0000 (15:10 +0000)
commit0709f1bb00287371da61a1fc94f6e2a086aa0f29
treea5aae7e780581c81736664be47e36c0c421c6802
parent468bc941886ae83b8d16af5deaaf12ea5cabb05b
cmd/compile/internal/ir: add CallExpr.GoDefer

The devirtualizer and inliner both want to recognize call expressions
that are part of a go or defer statement. This CL refactors them to
use a single CallExpr.GoDefer flag, which gets set during
normalization of go/defer statements during typecheck.

While here, drop some OCALLMETH assertions. Typecheck has been
responsible for desugaring them into OCALLFUNC for a while now, and
ssagen will check this again for us later anyway.

Change-Id: I3fc370f4417431aae97239313da6fe523f512a2e
Reviewed-on: https://go-review.googlesource.com/c/go/+/543657
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/devirtualize/devirtualize.go
src/cmd/compile/internal/inline/inl.go
src/cmd/compile/internal/ir/expr.go
src/cmd/compile/internal/typecheck/stmt.go