Lines Matching defs:o
29 #define CALL_RPEEP(o) PL_rpeepp(aTHX_ o)
33 S_scalar_slice_warning(pTHX_ const OP *o)
36 const bool is_hash = o->op_type == OP_HSLICE
37 || (o->op_type == OP_NULL && o->op_targ == OP_HSLICE);
40 if (!(o->op_private & OPpSLICEWARNING))
100 /* is the OP_SPRINTF o suitable for converting into a multiconcat op?
112 S_sprintf_is_multiconcatable(pTHX_ OP *o,struct sprintf_ismc_info *info)
124 assert(!(o->op_flags & OPf_STACKED));
126 assert(!(o->op_private & ~OPpARG4_MASK));
233 S_maybe_multiconcat(pTHX_ OP *o)
235 OP *lastkidop; /* the right-most of any kids unshifted onto o */
236 OP *topop; /* the top-most op in the concat tree (often equals o,
286 topop = o;
287 parentop = o;
289 assert( o->op_type == OP_SASSIGN
290 || o->op_type == OP_CONCAT
291 || o->op_type == OP_SPRINTF
292 || o->op_type == OP_STRINGIFY);
301 if (o->op_ppaddr != PL_ppaddr[OP_SASSIGN])
303 if (o->op_private & (OPpASSIGN_BACKWARDS|OPpASSIGN_CV_TO_GV))
305 assert(!(o->op_private & ~OPpARG2_MASK)); /* barf on unknown flags */
334 assert(!(o->op_private & OPpTARGET_MY));
337 assert(!(o->op_private & ~(OPpARG2_MASK|OPpTARGET_MY)));
356 && ( o->op_type == OP_SASSIGN
368 assert(!(o->op_private & ~(OPpARG4_MASK|OPpTARGET_MY)));
371 if (o->op_type == OP_SASSIGN)
413 if (o->op_type == OP_SASSIGN || targmyop)
555 * $o . "a" . "b"
557 * $o->concat("a")->concat("b")
559 * $o->concat("ab")
560 * (but $o .= "a" . "b" should still fold)
613 || o->op_type == OP_SASSIGN
693 * o => SASSIGN
710 * o => MULTICONCAT
717 * and unshifted onto o. Finally, any of o's remaining original
718 * children are discarded and o is converted into an OP_MULTICONCAT.
720 * In this middle of this, o may contain both: unshifted args on the
750 /* Attach all the args (i.e. the kids of the sprintf) to o (which
758 if (o != topop) {
760 op_sibling_splice(o, NULL, 0, kid); /* and attach to o */
761 lastkidop->op_next = o;
791 nextop = o;
828 else if (kid == o && lastkidop)
836 /* and unshift to front of o */
837 op_sibling_splice(o, NULL, 0, aop);
838 /* record the right-most op added to o: later we will
896 * the o optree)
899 (stringop == o)
900 ? op_sibling_splice(o, lastkidop, 1, NULL)
903 op_sibling_splice(o, NULL, 0, pmop);
916 if (o->op_type == OP_SASSIGN) {
917 /* Move the target subtree from being the last of o's children
918 * to being the last of o's preserved children.
924 op_sibling_splice(o, kid, 1, NULL); /* cut target op */
925 op_sibling_splice(o, lastkidop, 0, targetop); /* and paste */
930 /* Move the target subtree from being the first of o's
931 * original children to being the first of *all* o's children.
934 op_sibling_splice(o, lastkidop, 1, NULL); /* cut target op */
935 op_sibling_splice(o, NULL, 0, targetop); /* and paste*/
940 * tree and add to o" loop earlier */
949 op_sibling_splice(o, cUNOPo->op_first, 0, topop);
969 o->op_targ = targetop->op_targ;
978 if (o != targmyop) {
979 o->op_targ = targmyop->op_targ;
986 kid = op_sibling_splice(o, lastkidop, 1, NULL);
992 /* and convert o into a multiconcat */
994 o->op_flags = (flags|OPf_KIDS|stacked_last
995 |(o->op_flags & (OPf_WANT|OPf_PARENS)));
996 o->op_private = private_flags;
997 o->op_type = OP_MULTICONCAT;
998 o->op_ppaddr = PL_ppaddr[OP_MULTICONCAT];
1015 (o->op_private &OPpMULTICONCAT_STRINGIFY)
1034 Perl_optimize_optree(pTHX_ OP* o)
1041 optimize_op(o);
1047 #define warn_implicit_snail_cvsig(o) S_warn_implicit_snail_cvsig(aTHX_ o)
1049 S_warn_implicit_snail_cvsig(pTHX_ OP *o)
1057 "Implicit use of @_ in %s with signatured subroutine is experimental", OP_DESC(o));
1061 #define OP_ZOOM(o) (OP_TYPE_IS(o, OP_NULL) ? cUNOPx(o)->op_first : (o))
1068 S_optimize_op(pTHX_ OP* o)
1070 OP *top_op = o;
1077 assert(o->op_type != OP_FREED);
1079 switch (o->op_type) {
1082 PL_curcop = ((COP*)o); /* for warnings */
1090 S_maybe_multiconcat(aTHX_ o);
1095 /* we can't assume that op_pmreplroot->op_sibparent == o
1108 OP *first = (o->op_flags & OPf_KIDS) ? cUNOPo->op_first : NULL;
1115 OP *parent = op_parent(o);
1127 if(!CvUNIQUE(PL_compcv) && !(o->op_flags & OPf_KIDS))
1128 warn_implicit_snail_cvsig(o);
1132 if(!(o->op_flags & OPf_STACKED))
1133 warn_implicit_snail_cvsig(o);
1138 OP *first = (o->op_flags & OPf_KIDS) ? cUNOPo->op_first : NULL;
1143 warn_implicit_snail_cvsig(o);
1151 if (o->op_flags & OPf_KIDS)
1159 if (o == top_op)
1161 if (OpHAS_SIBLING(o))
1162 next_kid = o->op_sibparent;
1164 o = o->op_sibparent; /*try parent's next sibling */
1171 o = next_kid;
1187 Perl_finalize_optree(pTHX_ OP* o)
1194 finalize_op(o);
1206 The initial call must supply the root of the tree as both top and o.
1214 S_traverse_op_tree(pTHX_ OP *top, OP *o) {
1219 if ((o->op_flags & OPf_KIDS) && cUNOPo->op_first) {
1222 else if ((sib = OpSIBLING(o))) {
1226 OP *parent = o->op_sibparent;
1227 assert(!(o->op_moresib));
1240 S_finalize_op(pTHX_ OP* o)
1242 OP * const top = o;
1246 assert(o->op_type != OP_FREED);
1248 switch (o->op_type) {
1251 PL_curcop = ((COP*)o); /* for warnings */
1254 if (OpHAS_SIBLING(o)) {
1255 OP *sib = OpSIBLING(o);
1275 if ((o->op_private & OPpEARLY_CV) && ckWARN(WARN_PROTOTYPE)) {
1290 no_bareword_allowed(o);
1294 op_relocate_sv(&cSVOPo->op_sv, &o->op_targ);
1304 op_relocate_sv(&cMETHOPo->op_u.op_meth_sv, &o->op_targ);
1321 S_scalar_slice_warning(aTHX_ o);
1340 if (o->op_private & OPpLVAL_INTRO || rop->op_type != OP_RV2HV)
1346 if (o->op_targ != OP_HSLICE && o->op_targ != OP_ASLICE)
1350 S_scalar_slice_warning(aTHX_ o);
1363 if (o->op_flags & OPf_KIDS) {
1370 U32 type = o->op_type;
1375 type = o->op_targ;
1405 assert(kid->op_sibparent == o);
1410 } while (( o = traverse_op_tree(top, o)) != NULL);
1664 S_aassign_padcheck(pTHX_ OP* o, bool rhs)
1666 if (PAD_COMPNAME_GEN(o->op_targ) == PERL_INT_MAX)
1671 return cBOOL(PAD_COMPNAME_GEN(o->op_targ) == (STRLEN)PL_generation);
1673 PAD_COMPNAME_GEN_set(o->op_targ, PL_generation);
1693 S_aassign_scan(pTHX_ OP* o, bool rhs, int *scalars_p)
1695 OP *top_op = o;
1696 OP *effective_top_op = o;
1700 bool top = o == effective_top_op;
1707 && (o->op_flags & OPf_KIDS)
1708 && OP_TYPE_IS_OR_WAS(o, OP_LIST)
1726 switch (o->op_type) {
1736 all_flags |= (top && (o->op_flags & OPf_REF))
1737 ? ((o->op_private & OPpLVAL_INTRO)
1744 int comm = S_aassign_padcheck(aTHX_ o, rhs)
1747 all_flags |= (o->op_private & OPpLVAL_INTRO)
1756 if (cUNOPx(o)->op_first->op_type != OP_GV)
1760 else if (top && (o->op_flags & OPf_REF))
1768 if (cUNOPx(o)->op_first->op_type != OP_GV) {
1777 if (o->op_private & OPpSPLIT_ASSIGN) {
1786 if (o->op_flags & OPf_STACKED) {
1796 ? ((o->op_private & OPpLVAL_INTRO)
1836 if (PL_opargs[o->op_type] & OA_DANGEROUS) {
1842 if ( (PL_opargs[o->op_type] & OA_TARGLEX)
1843 && (o->op_private & OPpTARGET_MY))
1846 all_flags |= S_aassign_padcheck(aTHX_ o, rhs)
1866 if (o->op_flags & OPf_KIDS) {
1870 if ( o == effective_top_op
1871 && (o->op_type == OP_NULL || o->op_type == OP_LIST)
1882 if (o == top_op)
1884 if (OpHAS_SIBLING(o)) {
1885 next_kid = o->op_sibparent;
1886 if (o == effective_top_op)
1889 else if (o == effective_top_op)
1890 effective_top_op = o->op_sibparent;
1891 o = o->op_sibparent; /* try parent's next sibling */
1893 o = next_kid;
1935 OP *o = orig_o;
2015 if (o->op_type != OP_RV2AV && o->op_type != OP_RV2HV)
2020 ASSUME(!(o->op_flags & ~(OPf_WANT|OPf_KIDS|OPf_PARENS
2022 if (o->op_flags != (OPf_WANT_SCALAR|OPf_KIDS|OPf_REF))
2030 ASSUME(!(o->op_private &
2033 hints = (o->op_private & OPpHINT_STRICT_REFS);
2037 ASSUME(o->op_type == (next_is_hash ? OP_RV2HV : OP_RV2AV));
2038 top_op = o;
2043 o = o->op_next;
2054 switch (o->op_type) {
2057 ASSUME(!(o->op_flags & ~(OPf_WANT|OPf_PARENS
2059 ASSUME(!(o->op_private &
2062 if ( OP_GIMME(o,0) == G_SCALAR
2063 && !(o->op_flags & (OPf_REF|OPf_MOD))
2064 && o->op_private == 0)
2067 arg_buf[argi].pad_offset = o->op_targ;
2070 o = o->op_next;
2086 OP * helem_op = o->op_next;
2106 op_relocate_sv(&cSVOPo->op_sv, &o->op_targ);
2107 arg_buf[argi].pad_offset = o->op_targ;
2108 o->op_targ = 0;
2110 arg_buf[argi].sv = cSVOPx_sv(o);
2140 o = o->op_next;
2146 ASSUME(!(o->op_flags & ~(OPf_WANT|OPf_PARENS|OPf_SPECIAL)));
2147 ASSUME(!(o->op_private & ~(OPpEARLY_CV)));
2148 if ( (o->op_flags & ~(OPf_PARENS|OPf_SPECIAL)) != OPf_WANT_SCALAR
2149 || o->op_private != 0
2153 kid = o->op_next;
2172 arg_buf[argi].pad_offset = cPADOPx(o)->op_padix;
2174 cPADOPx(o)->op_padix = 0;
2176 arg_buf[argi].sv = cSVOPx(o)->op_sv;
2182 o = kid->op_next;
2201 if (o->op_type == OP_NULL)
2202 o = o->op_next;
2209 if ( (o->op_type == OP_AELEM || o->op_type == OP_HELEM)
2210 && PL_check[o->op_type] != Perl_ck_null)
2213 if ( (o->op_type == OP_EXISTS)
2214 && PL_check[o->op_type] != Perl_ck_exists)
2216 if ( (o->op_type == OP_DELETE)
2217 && PL_check[o->op_type] != Perl_ck_delete)
2220 if ( o->op_type != OP_AELEM
2221 || (o->op_private &
2234 || ( o->op_type != OP_AELEM && o->op_type != OP_HELEM
2235 && o->op_type != OP_EXISTS && o->op_type != OP_DELETE)
2241 is_deref = (o->op_type == OP_AELEM || o->op_type == OP_HELEM)
2242 && ( (o->op_private & OPpDEREF) == OPpDEREF_AV
2243 || (o->op_private & OPpDEREF) == OPpDEREF_HV);
2254 if (is_deref && (o->op_private & OPpLVAL_INTRO)) {
2256 OP *n = o->op_next;
2263 o->op_private &= ~OPpDEREF;
2268 ASSUME(!(o->op_flags &
2270 ASSUME(!(o->op_private & ~(OPpARG2_MASK|OPpDEREF)));
2272 ok = (o->op_flags &~ OPf_PARENS)
2274 && !(o->op_private & ~(OPpDEREF|OPpARG2_MASK));
2276 else if (o->op_type == OP_EXISTS) {
2277 ASSUME(!(o->op_flags & ~(OPf_WANT|OPf_KIDS|OPf_PARENS
2279 ASSUME(!(o->op_private & ~(OPpARG1_MASK|OPpEXISTS_SUB)));
2280 ok = !(o->op_private & ~OPpARG1_MASK);
2282 else if (o->op_type == OP_DELETE) {
2283 ASSUME(!(o->op_flags & ~(OPf_WANT|OPf_KIDS|OPf_PARENS
2285 ASSUME(!(o->op_private &
2289 ok = !(o->op_private & ~OPpARG1_MASK);
2292 ok = (ok && cBOOL(o->op_flags & OPf_SPECIAL));
2295 ASSUME(o->op_type == OP_AELEM || o->op_type == OP_HELEM);
2296 ASSUME(!(o->op_flags & ~(OPf_WANT|OPf_KIDS|OPf_MOD
2298 ASSUME(!(o->op_private & ~(OPpARG2_MASK|OPpMAYBE_LVSUB
2300 ok = (o->op_private & OPpDEREF) != OPpDEREF_SV;
2306 first_elem_op = o;
2307 top_op = o;
2309 next_is_hash = cBOOL((o->op_private & OPpDEREF) == OPpDEREF_HV);
2310 o = o->op_next;
2368 mderef->op_flags = o->op_flags
2370 if (o->op_type == OP_EXISTS)
2372 else if (o->op_type == OP_DELETE)
2375 mderef->op_private = o->op_private
2524 mderef->op_next = index_skip == -1 ? o->op_next : o;
2552 /* See if the ops following o are such that o will always be executed in
2553 * boolean context: that is, the SV which o pushes onto the stack will
2555 * If so, set a suitable private flag on o. Normally this will be
2585 * So mark o with maybe_flag rather than the bool_flag.
2603 S_check_for_bool_cxt(OP*o, bool safe_and, U8 bool_flag, U8 maybe_flag)
2608 assert((o->op_flags & OPf_WANT) == OPf_WANT_SCALAR);
2613 assert(!( (PL_opargs[o->op_type] & OA_TARGLEX)
2614 && (o->op_private & OPpTARGET_MY)));
2616 lop = o->op_next;
2679 o->op_private |= flag;
2686 #define DEFER(o) \
2695 defer_queue[(defer_base + ++defer_ix) % MAX_DEFERRED] = &(o); \
2698 #define IS_AND_OP(o) (o->op_type == OP_AND)
2699 #define IS_OR_OP(o) (o->op_type == OP_OR)
2706 Perl_rpeep(pTHX_ OP *o)
2714 if (!o || o->op_opt)
2717 assert(o->op_type != OP_FREED);
2722 for (;; o = o->op_next) {
2723 if (o && o->op_opt)
2724 o = NULL;
2725 if (!o) {
2737 /* oldoldop -> oldop -> o should be a chain of 3 adjacent ops */
2739 assert(!oldop || oldop->op_next == o);
2743 o->op_opt = 1;
2744 PL_op = o;
2763 OP *o2 = o;
2884 S_maybe_multideref(aTHX_ o, o2, action, 0);
2917 S_maybe_multideref(aTHX_ o, o2, action, hints);
2926 switch (o->op_type) {
2928 PL_curcop = ((COP*)o); /* for warnings */
2931 PL_curcop = ((COP*)o); /* for warnings */
2948 OP *next = o->op_next;
2949 OP *sibling = OpSIBLING(o);
2966 o->op_next = next->op_next;
2987 if (o->op_next && (
2988 o->op_next->op_type == OP_PADSV
2989 || o->op_next->op_type == OP_PADAV
2990 || o->op_next->op_type == OP_PADHV
2992 && !(o->op_next->op_private & ~OPpLVAL_INTRO)
2993 && o->op_next->op_next && o->op_next->op_next->op_type == OP_NEXTSTATE
2994 && o->op_next->op_next->op_next && (
2995 o->op_next->op_next->op_next->op_type == OP_PADSV
2996 || o->op_next->op_next->op_next->op_type == OP_PADAV
2997 || o->op_next->op_next->op_next->op_type == OP_PADHV
2999 && !(o->op_next->op_next->op_next->op_private & ~OPpLVAL_INTRO)
3000 && o->op_next->op_next->op_next->op_next && o->op_next->op_next->op_next->op_next->op_type == OP_NEXTSTATE
3001 && (!CopLABEL((COP*)o)) /* Don't mess with labels */
3002 && (!CopLABEL((COP*)o->op_next->op_next)) /* ... */
3006 pad1 = o->op_next;
3013 assert(OpSIBLING(o) == pad1);
3023 op_sibling_splice(NULL, o, 2, NULL);
3031 /* insert newop between o and ns3 */
3032 op_sibling_splice(NULL, o, 0, newop);
3036 o ->op_next = newpm;
3057 if (!CopLABEL((COP*)o) && !PERLDB_NOOPT) {
3058 OP *nextop = o->op_next;
3072 op_null(o);
3075 o = nextop;
3084 if (o->op_next && o->op_next->op_type == OP_STRINGIFY) {
3085 if (o->op_next->op_private & OPpTARGET_MY) {
3086 if (o->op_flags & OPf_STACKED) /* chained concats */
3089 /* assert(PL_opargs[o->op_type] & OA_TARGLEX); */
3090 o->op_targ = o->op_next->op_targ;
3091 o->op_next->op_targ = 0;
3092 o->op_private |= OPpTARGET_MY;
3095 op_null(o->op_next);
3099 if ((o->op_flags & OPf_WANT) != OPf_WANT_LIST) {
3104 if (o->op_targ == OP_NEXTSTATE
3105 || o->op_targ == OP_DBSTATE)
3107 PL_curcop = ((COP*)o);
3114 o->op_opt = 0;
3121 oldop->op_next = o->op_next;
3122 o->op_opt = 0;
3137 if (o->op_next->op_type == OP_CONST
3138 || ( o->op_next->op_type == OP_PADSV
3139 && !(o->op_next->op_private & OPpLVAL_INTRO))
3140 || ( o->op_next->op_type == OP_GV
3141 && o->op_next->op_next->op_type == OP_RV2SV
3142 && !(o->op_next->op_next->op_private
3145 const OP *kid = o->op_next->op_next;
3146 if (o->op_next->op_type == OP_GV)
3158 o = kid->op_next; /* repeat */
3159 oldop->op_next = o;
3162 o->op_flags &=~ OPf_KIDS;
3165 OpTYPE_set(o, OP_STUB);
3166 o->op_private = 0;
3205 p = o->op_next;
3224 p = o;
3348 assert(oldop->op_next == o);
3399 o = oldoldop;
3407 assert(o->op_type == OP_PUSHMARK);
3408 o->op_next = followop;
3409 OpTYPE_set(o, OP_PADRANGE);
3410 o->op_targ = base;
3412 o->op_private = (intro | count);
3413 o->op_flags = ((o->op_flags & ~(OPf_WANT|OPf_SPECIAL))
3421 if ((o->op_flags & OPf_WANT) == OPf_WANT_SCALAR)
3422 S_check_for_bool_cxt(o, 1, OPpTRUEBOOL, 0);
3431 if (o->op_flags & OPf_REF) {
3432 OP *k = o->op_next;
3441 o->op_next = k->op_next;
3442 o->op_flags &= ~(OPf_REF|OPf_WANT);
3443 o->op_flags |= want;
3444 o->op_private |= (o->op_type == OP_PADHV ?
3449 if (!(o->op_type ==OP_PADHV && want == OPf_WANT_SCALAR))
3455 if ((o->op_flags & OPf_WANT) == OPf_WANT_SCALAR)
3456 S_check_for_bool_cxt(o, 1, OPpTRUEBOOL, OPpMAYBE_TRUEBOOL);
3459 if (o->op_type != OP_PADHV)
3463 if ( o->op_type == OP_PADAV
3464 && (o->op_flags & OPf_WANT) == OPf_WANT_SCALAR
3466 S_check_for_bool_cxt(o, 1, OPpTRUEBOOL, 0);
3470 if (oldop && o->op_private == (OPpPAD_STATE|OPpLVAL_INTRO)
3471 && (o->op_flags & OPf_WANT) == OPf_WANT_VOID)
3473 oldop->op_next = o->op_next;
3476 if (o->op_type != OP_PADAV)
3480 if (o->op_type == OP_PADAV || o->op_next->op_type == OP_RV2AV) {
3481 OP* const pop = (o->op_type == OP_PADAV) ?
3482 o->op_next : o->op_next->op_next;
3494 if (o->op_type == OP_GV)
3495 op_null(o->op_next);
3498 o->op_flags |= pop->op_next->op_flags & OPf_MOD;
3499 o->op_next = pop->op_next->op_next;
3500 o->op_ppaddr = PL_ppaddr[OP_AELEMFAST];
3501 o->op_private = (U8)i;
3502 if (o->op_type == OP_GV) {
3505 o->op_type = OP_AELEMFAST;
3508 o->op_type = OP_AELEMFAST_LEX;
3510 if (o->op_type != OP_GV)
3516 && ( o->op_next->op_type == OP_RV2SV
3517 || o->op_next->op_type == OP_RV2AV
3518 || o->op_next->op_type == OP_RV2HV )
3519 && (o->op_next->op_flags & OPf_WANT) == OPf_WANT_VOID
3520 && !(o->op_next->op_private & OPpLVAL_INTRO))
3522 oldop->op_next = o->op_next->op_next;
3528 o = oldop;
3533 o = oldop->op_next;
3536 else if (o->op_next->op_type == OP_RV2SV) {
3537 if (!(o->op_next->op_private & OPpDEREF)) {
3538 op_null(o->op_next);
3539 o->op_private |= o->op_next->op_private & (OPpLVAL_INTRO
3541 o->op_next = o->op_next->op_next;
3542 OpTYPE_set(o, OP_GVSV);
3545 else if (o->op_next->op_type == OP_READLINE
3546 && o->op_next->op_next->op_type == OP_CONCAT
3547 && (o->op_next->op_next->op_flags & OPf_STACKED))
3550 OpTYPE_set(o, OP_RCATLINE);
3551 o->op_flags |= OPf_STACKED;
3552 op_null(o->op_next->op_next);
3553 op_null(o->op_next);
3568 while (o->op_next && ( o->op_type == o->op_next->op_type
3569 || o->op_next->op_type == OP_NULL))
3570 o->op_next = o->op_next->op_next;
3577 if (o->op_next &&
3579 (IS_AND_OP(o) && IS_OR_OP(o->op_next))
3580 || (IS_OR_OP(o) && IS_AND_OP(o->op_next))
3582 && (o->op_next->op_flags & OPf_WANT) == OPf_WANT_VOID
3584 o->op_next = cLOGOPx(o->op_next)->op_other;
3587 o->op_opt = 1;
3591 if ((o->op_flags & OPf_WANT) == OPf_WANT_SCALAR)
3592 S_check_for_bool_cxt(o, 1, OPpTRUEBOOL, 0);
3633 if ((o->op_flags & OPf_WANT) == OPf_WANT_SCALAR)
3634 S_check_for_bool_cxt(o, 1, OPpTRUEBOOL, 0);
3646 if (o->op_flags & OPf_SPECIAL) {
3678 if (o->op_private & OPpSORT_INPLACE)
3684 OP * const reverse = o->op_next;
3690 && (OpSIBLING(cUNOPx(pushmark)) == o)) {
3692 o->op_private |= OPpSORT_REVERSE;
3708 if (o->op_private & OPpSORT_INPLACE)
3711 enter = cLISTOPx(o->op_next);
3750 if (exlist->op_last != o) {
3758 if (OpSIBLING(theirmark) != o) {
3770 if (!ourlast || ourlast->op_next != o)
3787 op_null(o);
3793 o = oldop->op_next;
3800 if ((o->op_flags & OPf_KIDS) &&
3801 (cUNOPx(o)->op_first->op_type == OP_PADSV)) {
3810 OP * padsv = cUNOPx(o)->op_first;
3811 o->op_private = OPpTARGET_MY |
3813 o->op_targ = padsv->op_targ; padsv->op_targ = 0;
3817 oldoldop->op_next = o;
3821 } else if (o->op_next->op_type == OP_PADSV) {
3822 OP * padsv = o->op_next;
3826 if (sassign && cBINOPx(sassign)->op_first == o) {
3841 o->op_private = OPpTARGET_MY | OPpUNDEF_KEEP_PV |
3843 o->op_targ = padsv->op_targ; padsv->op_targ = 0;
3859 if (!(o->op_private & OPpOFFBYONE) && !CvCLONE(PL_compcv)
3869 OpTYPE_set(o, OP_CONST);
3870 o->op_flags |= OPf_SPECIAL;
3876 if (OP_GIMME(o,0) == G_VOID
3877 || ( o->op_next->op_type == OP_LINESEQ
3878 && ( o->op_next->op_next->op_type == OP_LEAVESUB
3879 || ( o->op_next->op_next->op_type == OP_RETURN
3904 op_null(o);
3906 op_sibling_splice(o, NULL, 1, NULL);
3912 (o->op_flags & ~OPf_WANT) | OPf_WANT_VOID;
3916 OP* rhs = cBINOPx(o)->op_first;
3917 OP* lval = cBINOPx(o)->op_last;
3927 if (!(o->op_private & (OPpASSIGN_BACKWARDS|OPpASSIGN_CV_TO_GV))
3940 OpTYPE_set(o, OP_PADSV_STORE);
3944 o->op_flags = (
3946 (o->op_flags & (OPf_WANT|OPf_PARENS))
3951 o->op_private = (lval->op_private &
3955 o->op_targ = lval->op_targ; lval->op_targ = 0;
3960 oldoldop->op_next = o;
3967 rhs->op_next = o;
3980 if (!(o->op_private & (OPpASSIGN_BACKWARDS|OPpASSIGN_CV_TO_GV))
3987 && OP_GIMME(o,0) == G_VOID
3992 OpTYPE_set(o, OP_AELEMFASTLEX_STORE);
3996 o->op_flags = (
3998 (o->op_flags & (OPf_WANT|OPf_PARENS))
4003 o->op_private = lex->op_private;
4006 o->op_targ = lex->op_targ; lex->op_targ = 0;
4010 oldoldop->op_next = o;
4019 rhs->op_next = o;
4079 o->op_private |= OPpASSIGN_COMMON_SCALAR;
4080 o->op_private |= OPpASSIGN_COMMON_AGG;
4086 o->op_private |= OPpASSIGN_COMMON_SCALAR;
4088 o->op_private |= OPpASSIGN_COMMON_AGG;
4096 o->op_private |= OPpASSIGN_COMMON_AGG;
4100 o->op_private |= OPpASSIGN_COMMON_SCALAR;
4122 o->op_private |= OPpASSIGN_COMMON_RC1;
4130 o->op_private &=
4133 if ((o->op_flags & OPf_WANT) == OPf_WANT_SCALAR)
4134 S_check_for_bool_cxt(o, 1, OPpASSIGN_TRUEBOOL, 0);
4143 if ((o->op_flags & OPf_WANT) == OPf_WANT_SCALAR)
4144 S_check_for_bool_cxt(o, 1, OPpTRUEBOOL, OPpMAYBE_TRUEBOOL);
4150 if ( (o->op_flags & OPf_WANT) == OPf_WANT_SCALAR
4151 && !(o->op_private & OPpTARGET_MY)
4153 S_check_for_bool_cxt(o, 1, OPpTRUEBOOL, 0);
4158 if ((o->op_flags & OPf_WANT) == OPf_WANT_SCALAR)
4159 S_check_for_bool_cxt(o, 1, OPpTRUEBOOL, 0);
4164 XopENTRYCUSTOM(o, xop_peep);
4166 cpeep(aTHX_ o, oldop);
4173 if (o->op_type == OP_NULL && oldop && oldop->op_next == o) {
4174 o->op_opt = 0;
4175 o = oldop;
4179 oldop = o;
4186 Perl_peep(pTHX_ OP *o)
4188 CALL_RPEEP(o);