Lines Matching defs:expr
2333 Perl_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
2335 SV *tstr = ((SVOP*)expr)->op_sv;
2562 op_free(expr);
2633 op_free(expr);
2684 Perl_pmruntime(pTHX_ OP *o, OP *expr, OP *repl)
2691 return pmtrans(o, expr, repl);
2696 if (expr->op_type == OP_CONST) {
2698 SV *pat = ((SVOP*)expr)->op_sv;
2710 op_free(expr);
2714 expr = newUNOP((!(PL_hints & HINT_RE_EVAL)
2716 : OP_REGCMAYBE),0,expr);
2721 rcop->op_first = scalar(expr);
2730 LINKLIST(expr);
2731 rcop->op_next = expr;
2732 ((UNOP*)expr)->op_first->op_next = (OP*)rcop;
2735 rcop->op_next = LINKLIST(expr);
2736 expr->op_next = (OP*)rcop;
3638 Perl_newLOOPOP(pTHX_ I32 flags, I32 debuggable, OP *expr, OP *block)
3645 if (expr) {
3646 if (once && expr->op_type == OP_CONST && !SvTRUE(((SVOP*)expr)->op_sv))
3648 if (expr->op_type == OP_READLINE || expr->op_type == OP_GLOB
3649 || (expr->op_type == OP_NULL && expr->op_targ == OP_GLOB)) {
3650 expr = newUNOP(OP_DEFINED, 0,
3651 newASSIGNOP(0, newDEFSVOP(), 0, expr) );
3652 } else if (expr->op_flags & OPf_KIDS) {
3653 OP *k1 = ((UNOP*)expr)->op_first;
3655 switch (expr->op_type) {
3660 expr = newUNOP(OP_DEFINED, 0, expr);
3668 expr = newUNOP(OP_DEFINED, 0, expr);
3679 o = new_logop(OP_AND, 0, &expr, &listop);
3697 Perl_newWHILEOP(pTHX_ I32 flags, I32 debuggable, LOOP *loop, I32 whileline, OP *expr, OP *block, OP *cont)
3705 if (expr && (expr->op_type == OP_READLINE || expr->op_type == OP_GLOB
3706 || (expr->op_type == OP_NULL && expr->op_targ == OP_GLOB))) {
3707 expr = newUNOP(OP_DEFINED, 0,
3708 newASSIGNOP(0, newDEFSVOP(), 0, expr) );
3709 } else if (expr && (expr->op_flags & OPf_KIDS)) {
3710 OP *k1 = ((UNOP*)expr)->op_first;
3712 switch (expr->op_type) {
3717 expr = newUNOP(OP_DEFINED, 0, expr);
3725 expr = newUNOP(OP_DEFINED, 0, expr);
3739 if (expr) {
3749 if (expr) {
3752 o = new_logop(OP_AND, 0, &expr, &listop);
3753 if (o == expr && o->op_type == OP_CONST && !SvTRUE(cSVOPo->op_sv)) {
3754 op_free(expr); /* oops, it's a while (0) */
3790 Perl_newFOROP(pTHX_ I32 flags,char *label,line_t forline,OP *sv,OP *expr,OP *block,OP *cont)
3829 if (expr->op_type == OP_RV2AV || expr->op_type == OP_PADAV) {
3830 expr = mod(force_list(scalar(ref(expr, OP_ITER))), OP_GREPSTART);
3833 else if (expr->op_type == OP_NULL &&
3834 (expr->op_flags & OPf_KIDS) &&
3835 ((BINOP*)expr)->op_first->op_type == OP_FLOP)
3841 UNOP* flip = (UNOP*)((UNOP*)((BINOP*)expr)->op_first)->op_first;
3856 op_free(expr);
3857 expr = (OP*)(listop);
3858 op_null(expr);
3862 expr = mod(force_list(expr), OP_GREPSTART);
3867 append_elem(OP_LIST, expr, scalar(sv))));