mirror of
https://github.com/golang/go
synced 2024-11-26 17:07:09 -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:
parent
d417b8cf87
commit
942bcc2d4f
@ -50,6 +50,7 @@ func Call(call *ir.CallExpr) {
|
|||||||
if base.Flag.LowerM != 0 {
|
if base.Flag.LowerM != 0 {
|
||||||
base.WarnfAt(call.Pos(), "devirtualizing %v to %v", sel, typ)
|
base.WarnfAt(call.Pos(), "devirtualizing %v to %v", sel, typ)
|
||||||
}
|
}
|
||||||
|
call.SetOp(ir.OCALLMETH)
|
||||||
call.X = x
|
call.X = x
|
||||||
case ir.ODOTINTER:
|
case ir.ODOTINTER:
|
||||||
// Promoted method from embedded interface-typed field (#42279).
|
// Promoted method from embedded interface-typed field (#42279).
|
||||||
|
Loading…
Reference in New Issue
Block a user