mirror of https://github.com/golang/go.git
[dev.typeparams] cmd/compile: remove OCALLMETH Fatals in SSA generation
CL 330831 moved rewrite method calls to typecheck pass, then add Fatalf check for mis-used of OCALLMETH in all frontend passes. The check in SSA generation pass is now redundant. Change-Id: If959b774ab3c3aeefabf32333f77b9a93c156ce3 Reviewed-on: https://go-review.googlesource.com/c/go/+/330834 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
0cf71f7f92
commit
27e3b797bb
|
|
@ -3119,10 +3119,6 @@ func (s *state) expr(n ir.Node) *ssa.Value {
|
|||
n := n.(*ir.CallExpr)
|
||||
return s.callResult(n, callNormal)
|
||||
|
||||
case ir.OCALLMETH:
|
||||
base.Fatalf("OCALLMETH missed by walkCall")
|
||||
panic("unreachable")
|
||||
|
||||
case ir.OGETG:
|
||||
n := n.(*ir.CallExpr)
|
||||
return s.newValue1(ssa.OpGetG, n.Type(), s.mem())
|
||||
|
|
@ -4860,8 +4856,6 @@ func (s *state) call(n *ir.CallExpr, k callKind, returnResultAddr bool) *ssa.Val
|
|||
// not the point of defer statement.
|
||||
s.maybeNilCheckClosure(closure, k)
|
||||
}
|
||||
case ir.OCALLMETH:
|
||||
base.Fatalf("OCALLMETH missed by walkCall")
|
||||
case ir.OCALLINTER:
|
||||
if fn.Op() != ir.ODOTINTER {
|
||||
s.Fatalf("OCALLINTER: n.Left not an ODOTINTER: %v", fn.Op())
|
||||
|
|
@ -4951,9 +4945,6 @@ func (s *state) call(n *ir.CallExpr, k callKind, returnResultAddr bool) *ssa.Val
|
|||
// Write args.
|
||||
t := n.X.Type()
|
||||
args := n.Args
|
||||
if n.Op() == ir.OCALLMETH {
|
||||
base.Fatalf("OCALLMETH missed by walkCall")
|
||||
}
|
||||
|
||||
for _, p := range params.InParams() { // includes receiver for interface calls
|
||||
ACArgs = append(ACArgs, p.Type)
|
||||
|
|
|
|||
Loading…
Reference in New Issue