From a15e89ac5c766f670b4f759b6a9026a3b9067505 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Fri, 29 Aug 2014 21:57:53 -0700 Subject: [PATCH] Stop turning off bit 1 in rv2cv private flags newUNOP turns on that bit by default, to indicate that the op has one kid. rv2cv was using that bit for something else, so three code paths had to turn it off. Two commits ago, rv2cv stopped using that bit, so turning it off is no longer necessary. It was because the flag using that bit, OPpMAY_RETURN_CONSTANT, needed to be passed to newUNOP, that it had to change. --- op.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/op.c b/op.c index 02ace5d..70365f7 100644 --- a/op.c +++ b/op.c @@ -2371,9 +2371,6 @@ Perl_op_lvalue_flags(pTHX_ OP *o, I32 type, U32 flags) if ((type == OP_UNDEF || type == OP_REFGEN || type == OP_LOCK) && !(o->op_flags & OPf_STACKED)) { o->op_type = OP_RV2CV; /* entersub => rv2cv */ - /* Both ENTERSUB and RV2CV use this bit, but for different pur- - poses, so we need it clear. */ - o->op_private &= ~1; o->op_ppaddr = PL_ppaddr[OP_RV2CV]; assert(cUNOPo->op_first->op_type == OP_NULL); op_null(((LISTOP*)cUNOPo->op_first)->op_first);/* disable pushmark */ @@ -2773,7 +2770,6 @@ Perl_doref(pTHX_ OP *o, I32 type, bool set_op_ref) assert(cUNOPo->op_first->op_type == OP_NULL); op_null(((LISTOP*)cUNOPo->op_first)->op_first); /* disable pushmark */ o->op_flags |= OPf_SPECIAL; - o->op_private &= ~1; } else if (type == OP_RV2SV || type == OP_RV2AV || type == OP_RV2HV){ o->op_private |= (type == OP_RV2AV ? OPpDEREF_AV @@ -8826,8 +8822,6 @@ Perl_ck_rvconst(pTHX_ OP *o) PERL_ARGS_ASSERT_CK_RVCONST; o->op_private |= (PL_hints & HINT_STRICT_REFS); - if (o->op_type == OP_RV2CV) - o->op_private &= ~1; if (kid->op_type == OP_CONST) { int iscv; -- 1.8.3.1