diff --git a/src/cmd/compile/internal/escape/expr.go b/src/cmd/compile/internal/escape/expr.go index 81c0528f1b0b97..6aa5ad74136f4f 100644 --- a/src/cmd/compile/internal/escape/expr.go +++ b/src/cmd/compile/internal/escape/expr.go @@ -113,13 +113,13 @@ func (e *escape) exprSkipInit(k hole, n ir.Node) { } else { e.expr(k, n.X) } - case ir.OCONVIFACE, ir.OCONVIDATA: + case ir.OCONVIFACE: n := n.(*ir.ConvExpr) if !n.X.Type().IsInterface() && !types.IsDirectIface(n.X.Type()) { k = e.spill(k, n) } e.expr(k.note(n, "interface-converted"), n.X) - case ir.OEFACE: + case ir.OMAKEFACE: n := n.(*ir.BinaryExpr) // Note: n.X is not needed because it can never point to memory that might escape. e.expr(k, n.Y) diff --git a/src/cmd/compile/internal/ir/expr.go b/src/cmd/compile/internal/ir/expr.go index 78d9f9692ab5e3..04398112ddc3ba 100644 --- a/src/cmd/compile/internal/ir/expr.go +++ b/src/cmd/compile/internal/ir/expr.go @@ -176,7 +176,7 @@ func (n *BinaryExpr) SetOp(op Op) { case OADD, OADDSTR, OAND, OANDNOT, ODIV, OEQ, OGE, OGT, OLE, OLSH, OLT, OMOD, OMUL, ONE, OOR, ORSH, OSUB, OXOR, OCOPY, OCOMPLEX, OUNSAFEADD, OUNSAFESLICE, OUNSAFESTRING, - OEFACE: + OMAKEFACE: n.op = op } } @@ -304,7 +304,7 @@ func (n *ConvExpr) SetOp(op Op) { switch op { default: panic(n.no("SetOp " + op.String())) - case OCONV, OCONVIFACE, OCONVIDATA, OCONVNOP, OBYTES2STR, OBYTES2STRTMP, ORUNES2STR, OSTR2BYTES, OSTR2BYTESTMP, OSTR2RUNES, ORUNESTR, OSLICE2ARR, OSLICE2ARRPTR: + case OCONV, OCONVIFACE, OCONVNOP, OBYTES2STR, OBYTES2STRTMP, ORUNES2STR, OSTR2BYTES, OSTR2BYTESTMP, OSTR2RUNES, ORUNESTR, OSLICE2ARR, OSLICE2ARRPTR: n.op = op } } diff --git a/src/cmd/compile/internal/ir/fmt.go b/src/cmd/compile/internal/ir/fmt.go index 1dad811d410562..81a25cd461e5d3 100644 --- a/src/cmd/compile/internal/ir/fmt.go +++ b/src/cmd/compile/internal/ir/fmt.go @@ -184,7 +184,6 @@ var OpPrec = []int{ OCLOSE: 8, OCOMPLIT: 8, OCONVIFACE: 8, - OCONVIDATA: 8, OCONVNOP: 8, OCONV: 8, OCOPY: 8, @@ -534,7 +533,7 @@ func exprFmt(n Node, s fmt.State, prec int) { n = nn.X continue } - case OCONV, OCONVNOP, OCONVIFACE, OCONVIDATA: + case OCONV, OCONVNOP, OCONVIFACE: nn := nn.(*ConvExpr) if nn.Implicit() { n = nn.X @@ -708,7 +707,6 @@ func exprFmt(n Node, s fmt.State, prec int) { case OCONV, OCONVIFACE, - OCONVIDATA, OCONVNOP, OBYTES2STR, ORUNES2STR, diff --git a/src/cmd/compile/internal/ir/node.go b/src/cmd/compile/internal/ir/node.go index b7b7dc10b88e4d..f3d1f21eeb58d1 100644 --- a/src/cmd/compile/internal/ir/node.go +++ b/src/cmd/compile/internal/ir/node.go @@ -169,7 +169,6 @@ const ( OPTRLIT // &X (X is composite literal) OCONV // Type(X) (type conversion) OCONVIFACE // Type(X) (type conversion, to interface) - OCONVIDATA // Builds a data word to store X in an interface. Equivalent to IDATA(CONVIFACE(X)). Is an ir.ConvExpr. OCONVNOP // Type(X) (type conversion, no effect) OCOPY // copy(X, Y) ODCL // var X (declares X of type X.Type) @@ -284,9 +283,9 @@ const ( // Body (body of the inlined function), and ReturnVars (list of // return values) OINLCALL // intermediary representation of an inlined call. - OEFACE // itable and data words of an empty-interface value. - OITAB // itable word of an interface value. - OIDATA // data word of an interface value in X + OMAKEFACE // construct an interface value from rtype/itab and data pointers + OITAB // rtype/itab pointer of an interface value + OIDATA // data pointer of an interface value OSPTR // base pointer of a slice or string. Bounded==1 means known non-nil. OCFUNC // reference to c function pointer (not go func value) OCHECKNIL // emit code to ensure pointer/interface not nil diff --git a/src/cmd/compile/internal/ir/op_string.go b/src/cmd/compile/internal/ir/op_string.go index 25d36723369f6b..cf8f10d8299c92 100644 --- a/src/cmd/compile/internal/ir/op_string.go +++ b/src/cmd/compile/internal/ir/op_string.go @@ -53,118 +53,117 @@ func _() { _ = x[OPTRLIT-42] _ = x[OCONV-43] _ = x[OCONVIFACE-44] - _ = x[OCONVIDATA-45] - _ = x[OCONVNOP-46] - _ = x[OCOPY-47] - _ = x[ODCL-48] - _ = x[ODCLFUNC-49] - _ = x[ODELETE-50] - _ = x[ODOT-51] - _ = x[ODOTPTR-52] - _ = x[ODOTMETH-53] - _ = x[ODOTINTER-54] - _ = x[OXDOT-55] - _ = x[ODOTTYPE-56] - _ = x[ODOTTYPE2-57] - _ = x[OEQ-58] - _ = x[ONE-59] - _ = x[OLT-60] - _ = x[OLE-61] - _ = x[OGE-62] - _ = x[OGT-63] - _ = x[ODEREF-64] - _ = x[OINDEX-65] - _ = x[OINDEXMAP-66] - _ = x[OKEY-67] - _ = x[OSTRUCTKEY-68] - _ = x[OLEN-69] - _ = x[OMAKE-70] - _ = x[OMAKECHAN-71] - _ = x[OMAKEMAP-72] - _ = x[OMAKESLICE-73] - _ = x[OMAKESLICECOPY-74] - _ = x[OMUL-75] - _ = x[ODIV-76] - _ = x[OMOD-77] - _ = x[OLSH-78] - _ = x[ORSH-79] - _ = x[OAND-80] - _ = x[OANDNOT-81] - _ = x[ONEW-82] - _ = x[ONOT-83] - _ = x[OBITNOT-84] - _ = x[OPLUS-85] - _ = x[ONEG-86] - _ = x[OOROR-87] - _ = x[OPANIC-88] - _ = x[OPRINT-89] - _ = x[OPRINTN-90] - _ = x[OPAREN-91] - _ = x[OSEND-92] - _ = x[OSLICE-93] - _ = x[OSLICEARR-94] - _ = x[OSLICESTR-95] - _ = x[OSLICE3-96] - _ = x[OSLICE3ARR-97] - _ = x[OSLICEHEADER-98] - _ = x[OSTRINGHEADER-99] - _ = x[ORECOVER-100] - _ = x[ORECOVERFP-101] - _ = x[ORECV-102] - _ = x[ORUNESTR-103] - _ = x[OSELRECV2-104] - _ = x[OMIN-105] - _ = x[OMAX-106] - _ = x[OREAL-107] - _ = x[OIMAG-108] - _ = x[OCOMPLEX-109] - _ = x[OUNSAFEADD-110] - _ = x[OUNSAFESLICE-111] - _ = x[OUNSAFESLICEDATA-112] - _ = x[OUNSAFESTRING-113] - _ = x[OUNSAFESTRINGDATA-114] - _ = x[OMETHEXPR-115] - _ = x[OMETHVALUE-116] - _ = x[OBLOCK-117] - _ = x[OBREAK-118] - _ = x[OCASE-119] - _ = x[OCONTINUE-120] - _ = x[ODEFER-121] - _ = x[OFALL-122] - _ = x[OFOR-123] - _ = x[OGOTO-124] - _ = x[OIF-125] - _ = x[OLABEL-126] - _ = x[OGO-127] - _ = x[ORANGE-128] - _ = x[ORETURN-129] - _ = x[OSELECT-130] - _ = x[OSWITCH-131] - _ = x[OTYPESW-132] - _ = x[OINLCALL-133] - _ = x[OEFACE-134] - _ = x[OITAB-135] - _ = x[OIDATA-136] - _ = x[OSPTR-137] - _ = x[OCFUNC-138] - _ = x[OCHECKNIL-139] - _ = x[ORESULT-140] - _ = x[OINLMARK-141] - _ = x[OLINKSYMOFFSET-142] - _ = x[OJUMPTABLE-143] - _ = x[ODYNAMICDOTTYPE-144] - _ = x[ODYNAMICDOTTYPE2-145] - _ = x[ODYNAMICTYPE-146] - _ = x[OTAILCALL-147] - _ = x[OGETG-148] - _ = x[OGETCALLERPC-149] - _ = x[OGETCALLERSP-150] - _ = x[OEND-151] + _ = x[OCONVNOP-45] + _ = x[OCOPY-46] + _ = x[ODCL-47] + _ = x[ODCLFUNC-48] + _ = x[ODELETE-49] + _ = x[ODOT-50] + _ = x[ODOTPTR-51] + _ = x[ODOTMETH-52] + _ = x[ODOTINTER-53] + _ = x[OXDOT-54] + _ = x[ODOTTYPE-55] + _ = x[ODOTTYPE2-56] + _ = x[OEQ-57] + _ = x[ONE-58] + _ = x[OLT-59] + _ = x[OLE-60] + _ = x[OGE-61] + _ = x[OGT-62] + _ = x[ODEREF-63] + _ = x[OINDEX-64] + _ = x[OINDEXMAP-65] + _ = x[OKEY-66] + _ = x[OSTRUCTKEY-67] + _ = x[OLEN-68] + _ = x[OMAKE-69] + _ = x[OMAKECHAN-70] + _ = x[OMAKEMAP-71] + _ = x[OMAKESLICE-72] + _ = x[OMAKESLICECOPY-73] + _ = x[OMUL-74] + _ = x[ODIV-75] + _ = x[OMOD-76] + _ = x[OLSH-77] + _ = x[ORSH-78] + _ = x[OAND-79] + _ = x[OANDNOT-80] + _ = x[ONEW-81] + _ = x[ONOT-82] + _ = x[OBITNOT-83] + _ = x[OPLUS-84] + _ = x[ONEG-85] + _ = x[OOROR-86] + _ = x[OPANIC-87] + _ = x[OPRINT-88] + _ = x[OPRINTN-89] + _ = x[OPAREN-90] + _ = x[OSEND-91] + _ = x[OSLICE-92] + _ = x[OSLICEARR-93] + _ = x[OSLICESTR-94] + _ = x[OSLICE3-95] + _ = x[OSLICE3ARR-96] + _ = x[OSLICEHEADER-97] + _ = x[OSTRINGHEADER-98] + _ = x[ORECOVER-99] + _ = x[ORECOVERFP-100] + _ = x[ORECV-101] + _ = x[ORUNESTR-102] + _ = x[OSELRECV2-103] + _ = x[OMIN-104] + _ = x[OMAX-105] + _ = x[OREAL-106] + _ = x[OIMAG-107] + _ = x[OCOMPLEX-108] + _ = x[OUNSAFEADD-109] + _ = x[OUNSAFESLICE-110] + _ = x[OUNSAFESLICEDATA-111] + _ = x[OUNSAFESTRING-112] + _ = x[OUNSAFESTRINGDATA-113] + _ = x[OMETHEXPR-114] + _ = x[OMETHVALUE-115] + _ = x[OBLOCK-116] + _ = x[OBREAK-117] + _ = x[OCASE-118] + _ = x[OCONTINUE-119] + _ = x[ODEFER-120] + _ = x[OFALL-121] + _ = x[OFOR-122] + _ = x[OGOTO-123] + _ = x[OIF-124] + _ = x[OLABEL-125] + _ = x[OGO-126] + _ = x[ORANGE-127] + _ = x[ORETURN-128] + _ = x[OSELECT-129] + _ = x[OSWITCH-130] + _ = x[OTYPESW-131] + _ = x[OINLCALL-132] + _ = x[OMAKEFACE-133] + _ = x[OITAB-134] + _ = x[OIDATA-135] + _ = x[OSPTR-136] + _ = x[OCFUNC-137] + _ = x[OCHECKNIL-138] + _ = x[ORESULT-139] + _ = x[OINLMARK-140] + _ = x[OLINKSYMOFFSET-141] + _ = x[OJUMPTABLE-142] + _ = x[ODYNAMICDOTTYPE-143] + _ = x[ODYNAMICDOTTYPE2-144] + _ = x[ODYNAMICTYPE-145] + _ = x[OTAILCALL-146] + _ = x[OGETG-147] + _ = x[OGETCALLERPC-148] + _ = x[OGETCALLERSP-149] + _ = x[OEND-150] } -const _Op_name = "XXXNAMENONAMETYPELITERALNILADDSUBORXORADDSTRADDRANDANDAPPENDBYTES2STRBYTES2STRTMPRUNES2STRSTR2BYTESSTR2BYTESTMPSTR2RUNESSLICE2ARRSLICE2ARRPTRASAS2AS2DOTTYPEAS2FUNCAS2MAPRAS2RECVASOPCALLCALLFUNCCALLMETHCALLINTERCAPCLEARCLOSECLOSURECOMPLITMAPLITSTRUCTLITARRAYLITSLICELITPTRLITCONVCONVIFACECONVIDATACONVNOPCOPYDCLDCLFUNCDELETEDOTDOTPTRDOTMETHDOTINTERXDOTDOTTYPEDOTTYPE2EQNELTLEGEGTDEREFINDEXINDEXMAPKEYSTRUCTKEYLENMAKEMAKECHANMAKEMAPMAKESLICEMAKESLICECOPYMULDIVMODLSHRSHANDANDNOTNEWNOTBITNOTPLUSNEGORORPANICPRINTPRINTNPARENSENDSLICESLICEARRSLICESTRSLICE3SLICE3ARRSLICEHEADERSTRINGHEADERRECOVERRECOVERFPRECVRUNESTRSELRECV2MINMAXREALIMAGCOMPLEXUNSAFEADDUNSAFESLICEUNSAFESLICEDATAUNSAFESTRINGUNSAFESTRINGDATAMETHEXPRMETHVALUEBLOCKBREAKCASECONTINUEDEFERFALLFORGOTOIFLABELGORANGERETURNSELECTSWITCHTYPESWINLCALLEFACEITABIDATASPTRCFUNCCHECKNILRESULTINLMARKLINKSYMOFFSETJUMPTABLEDYNAMICDOTTYPEDYNAMICDOTTYPE2DYNAMICTYPETAILCALLGETGGETCALLERPCGETCALLERSPEND" +const _Op_name = "XXXNAMENONAMETYPELITERALNILADDSUBORXORADDSTRADDRANDANDAPPENDBYTES2STRBYTES2STRTMPRUNES2STRSTR2BYTESSTR2BYTESTMPSTR2RUNESSLICE2ARRSLICE2ARRPTRASAS2AS2DOTTYPEAS2FUNCAS2MAPRAS2RECVASOPCALLCALLFUNCCALLMETHCALLINTERCAPCLEARCLOSECLOSURECOMPLITMAPLITSTRUCTLITARRAYLITSLICELITPTRLITCONVCONVIFACECONVNOPCOPYDCLDCLFUNCDELETEDOTDOTPTRDOTMETHDOTINTERXDOTDOTTYPEDOTTYPE2EQNELTLEGEGTDEREFINDEXINDEXMAPKEYSTRUCTKEYLENMAKEMAKECHANMAKEMAPMAKESLICEMAKESLICECOPYMULDIVMODLSHRSHANDANDNOTNEWNOTBITNOTPLUSNEGORORPANICPRINTPRINTNPARENSENDSLICESLICEARRSLICESTRSLICE3SLICE3ARRSLICEHEADERSTRINGHEADERRECOVERRECOVERFPRECVRUNESTRSELRECV2MINMAXREALIMAGCOMPLEXUNSAFEADDUNSAFESLICEUNSAFESLICEDATAUNSAFESTRINGUNSAFESTRINGDATAMETHEXPRMETHVALUEBLOCKBREAKCASECONTINUEDEFERFALLFORGOTOIFLABELGORANGERETURNSELECTSWITCHTYPESWINLCALLMAKEFACEITABIDATASPTRCFUNCCHECKNILRESULTINLMARKLINKSYMOFFSETJUMPTABLEDYNAMICDOTTYPEDYNAMICDOTTYPE2DYNAMICTYPETAILCALLGETGGETCALLERPCGETCALLERSPEND" -var _Op_index = [...]uint16{0, 3, 7, 13, 17, 24, 27, 30, 33, 35, 38, 44, 48, 54, 60, 69, 81, 90, 99, 111, 120, 129, 141, 143, 146, 156, 163, 170, 177, 181, 185, 193, 201, 210, 213, 218, 223, 230, 237, 243, 252, 260, 268, 274, 278, 287, 296, 303, 307, 310, 317, 323, 326, 332, 339, 347, 351, 358, 366, 368, 370, 372, 374, 376, 378, 383, 388, 396, 399, 408, 411, 415, 423, 430, 439, 452, 455, 458, 461, 464, 467, 470, 476, 479, 482, 488, 492, 495, 499, 504, 509, 515, 520, 524, 529, 537, 545, 551, 560, 571, 583, 590, 599, 603, 610, 618, 621, 624, 628, 632, 639, 648, 659, 674, 686, 702, 710, 719, 724, 729, 733, 741, 746, 750, 753, 757, 759, 764, 766, 771, 777, 783, 789, 795, 802, 807, 811, 816, 820, 825, 833, 839, 846, 859, 868, 882, 897, 908, 916, 920, 931, 942, 945} +var _Op_index = [...]uint16{0, 3, 7, 13, 17, 24, 27, 30, 33, 35, 38, 44, 48, 54, 60, 69, 81, 90, 99, 111, 120, 129, 141, 143, 146, 156, 163, 170, 177, 181, 185, 193, 201, 210, 213, 218, 223, 230, 237, 243, 252, 260, 268, 274, 278, 287, 294, 298, 301, 308, 314, 317, 323, 330, 338, 342, 349, 357, 359, 361, 363, 365, 367, 369, 374, 379, 387, 390, 399, 402, 406, 414, 421, 430, 443, 446, 449, 452, 455, 458, 461, 467, 470, 473, 479, 483, 486, 490, 495, 500, 506, 511, 515, 520, 528, 536, 542, 551, 562, 574, 581, 590, 594, 601, 609, 612, 615, 619, 623, 630, 639, 650, 665, 677, 693, 701, 710, 715, 720, 724, 732, 737, 741, 744, 748, 750, 755, 757, 762, 768, 774, 780, 786, 793, 801, 805, 810, 814, 819, 827, 833, 840, 853, 862, 876, 891, 902, 910, 914, 925, 936, 939} func (i Op) String() string { if i >= Op(len(_Op_index)-1) { diff --git a/src/cmd/compile/internal/reflectdata/helpers.go b/src/cmd/compile/internal/reflectdata/helpers.go index 1b322466ed862c..9ba62d6a2967da 100644 --- a/src/cmd/compile/internal/reflectdata/helpers.go +++ b/src/cmd/compile/internal/reflectdata/helpers.go @@ -116,11 +116,11 @@ func ConvIfaceTypeWord(pos src.XPos, n *ir.ConvExpr) ir.Node { } // ConvIfaceSrcRType asserts that n is a conversion from -// non-interface type to interface type (or OCONVIDATA operation), and +// non-interface type to interface type, and // returns an expression that yields the *runtime._type for copying // the convertee value to the heap. func ConvIfaceSrcRType(pos src.XPos, n *ir.ConvExpr) ir.Node { - assertOp2(n, ir.OCONVIFACE, ir.OCONVIDATA) + assertOp(n, ir.OCONVIFACE) if hasRType(n, n.SrcRType, "SrcRType") { return n.SrcRType } diff --git a/src/cmd/compile/internal/ssagen/ssa.go b/src/cmd/compile/internal/ssagen/ssa.go index cfc8b6682c7ca2..b8f48b33a57ae5 100644 --- a/src/cmd/compile/internal/ssagen/ssa.go +++ b/src/cmd/compile/internal/ssagen/ssa.go @@ -3222,7 +3222,7 @@ func (s *state) exprCheckPtr(n ir.Node, checkPtrOK bool) *ssa.Value { a := s.expr(n.X) return s.newValue1(ssa.OpIData, n.Type(), a) - case ir.OEFACE: + case ir.OMAKEFACE: n := n.(*ir.BinaryExpr) tab := s.expr(n.X) data := s.expr(n.Y) diff --git a/src/cmd/compile/internal/walk/assign.go b/src/cmd/compile/internal/walk/assign.go index b8dcba5968a6f1..e601ba61a18eb1 100644 --- a/src/cmd/compile/internal/walk/assign.go +++ b/src/cmd/compile/internal/walk/assign.go @@ -432,7 +432,6 @@ func readsMemory(n ir.Node) bool { ir.OBITNOT, ir.OCONV, ir.OCONVIFACE, - ir.OCONVIDATA, ir.OCONVNOP, ir.ODIV, ir.ODOT, diff --git a/src/cmd/compile/internal/walk/convert.go b/src/cmd/compile/internal/walk/convert.go index 9548db82c09e28..99ca2522cf9217 100644 --- a/src/cmd/compile/internal/walk/convert.go +++ b/src/cmd/compile/internal/walk/convert.go @@ -57,7 +57,7 @@ func walkConvInterface(n *ir.ConvExpr, init *ir.Nodes) ir.Node { if !fromType.IsInterface() { typeWord := reflectdata.ConvIfaceTypeWord(base.Pos, n) - l := ir.NewBinaryExpr(base.Pos, ir.OEFACE, typeWord, dataWord(n, init)) + l := ir.NewBinaryExpr(base.Pos, ir.OMAKEFACE, typeWord, dataWord(n, init)) l.SetType(toType) l.SetTypecheck(n.Typecheck()) return l @@ -104,7 +104,7 @@ func walkConvInterface(n *ir.ConvExpr, init *ir.Nodes) ir.Node { // Build the result. // e = iface{typeWord, data} - e := ir.NewBinaryExpr(base.Pos, ir.OEFACE, typeWord, data) + e := ir.NewBinaryExpr(base.Pos, ir.OMAKEFACE, typeWord, data) e.SetType(toType) // assign type manually, typecheck doesn't understand OEFACE. e.SetTypecheck(1) return e @@ -212,12 +212,6 @@ func dataWord(conv *ir.ConvExpr, init *ir.Nodes) ir.Node { return safeExpr(walkExpr(typecheck.Expr(call), init), init) } -// walkConvIData walks an OCONVIDATA node. -func walkConvIData(n *ir.ConvExpr, init *ir.Nodes) ir.Node { - n.X = walkExpr(n.X, init) - return dataWord(n, init) -} - // walkBytesRunesToString walks an OBYTES2STR or ORUNES2STR node. func walkBytesRunesToString(n *ir.ConvExpr, init *ir.Nodes) ir.Node { a := typecheck.NodNil() diff --git a/src/cmd/compile/internal/walk/expr.go b/src/cmd/compile/internal/walk/expr.go index b5e60506343d1b..b4e42470b9da3e 100644 --- a/src/cmd/compile/internal/walk/expr.go +++ b/src/cmd/compile/internal/walk/expr.go @@ -123,7 +123,7 @@ func walkExpr1(n ir.Node, init *ir.Nodes) ir.Node { n.X = walkExpr(n.X, init) return n - case ir.OEFACE, ir.OAND, ir.OANDNOT, ir.OSUB, ir.OMUL, ir.OADD, ir.OOR, ir.OXOR, ir.OLSH, ir.ORSH, + case ir.OMAKEFACE, ir.OAND, ir.OANDNOT, ir.OSUB, ir.OMUL, ir.OADD, ir.OOR, ir.OXOR, ir.OLSH, ir.ORSH, ir.OUNSAFEADD: n := n.(*ir.BinaryExpr) n.X = walkExpr(n.X, init) @@ -224,10 +224,6 @@ func walkExpr1(n ir.Node, init *ir.Nodes) ir.Node { n := n.(*ir.ConvExpr) return walkConvInterface(n, init) - case ir.OCONVIDATA: - n := n.(*ir.ConvExpr) - return walkConvIData(n, init) - case ir.OCONV, ir.OCONVNOP: n := n.(*ir.ConvExpr) return walkConv(n, init) diff --git a/src/cmd/compile/internal/walk/order.go b/src/cmd/compile/internal/walk/order.go index 0cd050c3ea9e77..8db9e919c70b90 100644 --- a/src/cmd/compile/internal/walk/order.go +++ b/src/cmd/compile/internal/walk/order.go @@ -1164,7 +1164,7 @@ func (o *orderState) expr1(n, lhs ir.Node) ir.Node { // concrete type (not interface) argument might need an addressable // temporary to pass to the runtime conversion routine. - case ir.OCONVIFACE, ir.OCONVIDATA: + case ir.OCONVIFACE: n := n.(*ir.ConvExpr) n.X = o.expr(n.X, nil) if n.X.Type().IsInterface() { @@ -1173,7 +1173,7 @@ func (o *orderState) expr1(n, lhs ir.Node) ir.Node { if _, _, needsaddr := dataWordFuncName(n.X.Type()); needsaddr || isStaticCompositeLiteral(n.X) { // Need a temp if we need to pass the address to the conversion function. // We also process static composite literal node here, making a named static global - // whose address we can put directly in an interface (see OCONVIFACE/OCONVIDATA case in walk). + // whose address we can put directly in an interface (see OCONVIFACE case in walk). n.X = o.addrTemp(n.X) } return n diff --git a/src/cmd/compile/internal/walk/walk.go b/src/cmd/compile/internal/walk/walk.go index be41e06b80f7bc..b09f7f1732d409 100644 --- a/src/cmd/compile/internal/walk/walk.go +++ b/src/cmd/compile/internal/walk/walk.go @@ -333,7 +333,7 @@ func mayCall(n ir.Node) bool { return n.Type().IsString() || n.Type().IsFloat() case ir.OLITERAL, ir.ONIL, ir.ONAME, ir.OLINKSYMOFFSET, ir.OMETHEXPR, - ir.OAND, ir.OANDNOT, ir.OLSH, ir.OOR, ir.ORSH, ir.OXOR, ir.OCOMPLEX, ir.OEFACE, + ir.OAND, ir.OANDNOT, ir.OLSH, ir.OOR, ir.ORSH, ir.OXOR, ir.OCOMPLEX, ir.OMAKEFACE, ir.OADDR, ir.OBITNOT, ir.ONOT, ir.OPLUS, ir.OCAP, ir.OIMAG, ir.OLEN, ir.OREAL, ir.OCONVNOP, ir.ODOT,