X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fcmd%2Fcompile%2Finternal%2Fwalk%2Forder.go;h=4d9b2fbee566ef79128cd1c61b4e9ed884b5e6e1;hb=e323e7d973cbc0fb979bee35baa606b72f38b408;hp=828a1537e229f1d672cc772421da2e2916252b06;hpb=505dff4fe260cc0b92482cfcf6d4dce233d2b10d;p=gostls13.git diff --git a/src/cmd/compile/internal/walk/order.go b/src/cmd/compile/internal/walk/order.go index 828a1537e2..4d9b2fbee5 100644 --- a/src/cmd/compile/internal/walk/order.go +++ b/src/cmd/compile/internal/walk/order.go @@ -538,7 +538,7 @@ func (o *orderState) call(nn ir.Node) { n := nn.(*ir.CallExpr) typecheck.AssertFixedCall(n) - if ir.IsFuncPCIntrinsic(n) && isIfaceOfFunc(n.Args[0]) { + if ir.IsFuncPCIntrinsic(n) && ir.IsIfaceOfFunc(n.Args[0]) != nil { // For internal/abi.FuncPCABIxxx(fn), if fn is a defined function, // do not introduce temporaries here, so it is easier to rewrite it // to symbol address reference later in walk. @@ -1502,8 +1502,3 @@ func (o *orderState) as2ok(n *ir.AssignListStmt) { o.out = append(o.out, n) o.stmt(typecheck.Stmt(as)) } - -// isIfaceOfFunc returns whether n is an interface conversion from a direct reference of a func. -func isIfaceOfFunc(n ir.Node) bool { - return n.Op() == ir.OCONVIFACE && n.(*ir.ConvExpr).X.Op() == ir.ONAME && n.(*ir.ConvExpr).X.(*ir.Name).Class == ir.PFUNC -}