1
0
mirror of https://github.com/golang/go synced 2024-11-22 15:54:52 -07:00

[dev.typeparams] cmd/compile: fix wrong AST generation in devirtualization

CL 330671 moved rewrite method calls to escape analysis. It accidently
made the AST invalid, by removing the OCALLMETH set operation during
devirtualization pass.

Change-Id: I862ffd7f880de55969d7784d9e7b3c38894f6b68
Reviewed-on: https://go-review.googlesource.com/c/go/+/330832
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Cuong Manh Le 2021-06-26 13:57:51 +07:00
parent d417b8cf87
commit 942bcc2d4f

View File

@ -50,6 +50,7 @@ func Call(call *ir.CallExpr) {
if base.Flag.LowerM != 0 {
base.WarnfAt(call.Pos(), "devirtualizing %v to %v", sel, typ)
}
call.SetOp(ir.OCALLMETH)
call.X = x
case ir.ODOTINTER:
// Promoted method from embedded interface-typed field (#42279).