mirror of
https://github.com/golang/go
synced 2024-09-15 22:20:06 +00:00
[dev.unified] cmd/compile: remove obsolete RTTI wiring
Comparisons between interface-typed and non-interface-typed expressions no longer happen within Unified IR since CL 415577, so this code path is no longer needed. Change-Id: I075dfd1e6c34799f32766ed052eab0710bc6cbd5 Reviewed-on: https://go-review.googlesource.com/c/go/+/419454 Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
131f981df0
commit
f48fa643f1
|
@ -1786,19 +1786,7 @@ func (r *reader) expr() (res ir.Node) {
|
|||
case ir.OANDAND, ir.OOROR:
|
||||
return typecheck.Expr(ir.NewLogicalExpr(pos, op, x, y))
|
||||
}
|
||||
n := typecheck.Expr(ir.NewBinaryExpr(pos, op, x, y))
|
||||
switch n.Op() {
|
||||
case ir.OEQ, ir.ONE:
|
||||
n := n.(*ir.BinaryExpr)
|
||||
if n.X.Type().IsInterface() != n.Y.Type().IsInterface() {
|
||||
typ := n.X.Type()
|
||||
if typ.IsInterface() {
|
||||
typ = n.Y.Type()
|
||||
}
|
||||
n.RType = reflectdata.TypePtrAt(pos, typ)
|
||||
}
|
||||
}
|
||||
return n
|
||||
return typecheck.Expr(ir.NewBinaryExpr(pos, op, x, y))
|
||||
|
||||
case exprCall:
|
||||
fun := r.expr()
|
||||
|
|
Loading…
Reference in a new issue