diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-11-30 09:53:11 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-11-30 09:53:11 +0000 |
commit | 7c8a3dfd3bf64e6ea427f38183b879af54fe8f18 (patch) | |
tree | 9033ae135f793c7a534beeca7afa53f969a4df5f /op.c | |
parent | d569369663d5f1104f258f47a91ede9f4feb155e (diff) | |
download | perl-7c8a3dfd3bf64e6ea427f38183b879af54fe8f18.tar.gz |
Revert change #22520 (optimise away my $foo = undef and similar
constructs), in order to fix bug perl #37776
p4raw-link: @22520 on //depot/perl: b9d46b3942a9a8cce9cbca1e08f61ac23083a740
p4raw-id: //depot/perl@26226
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 22 |
1 files changed, 0 insertions, 22 deletions
@@ -3300,15 +3300,6 @@ Perl_newASSIGNOP(pTHX_ I32 flags, OP *left, I32 optype, OP *right) /* Result of assignment is always 1 (or we'd be dead already) */ return newSVOP(OP_CONST, 0, newSViv(1)); } - /* optimise C<my @x = ()> to C<my @x>, and likewise for hashes */ - if ((left->op_type == OP_PADAV || left->op_type == OP_PADHV) - && right->op_type == OP_STUB - && (left->op_private & OPpLVAL_INTRO)) - { - op_free(right); - left->op_flags &= ~(OPf_REF|OPf_SPECIAL); - return left; - } curop = list(force_list(left)); o = newBINOP(OP_AASSIGN, flags, list(force_list(right)), curop); o->op_private = (U8)(0 | (flags >> 8)); @@ -5802,19 +5793,6 @@ Perl_ck_sassign(pTHX_ OP *o) return kid; } } - /* optimise C<my $x = undef> to C<my $x> */ - if (kid->op_type == OP_UNDEF) { - OP * const kkid = kid->op_sibling; - if (kkid && kkid->op_type == OP_PADSV - && (kkid->op_private & OPpLVAL_INTRO)) - { - cLISTOPo->op_first = NULL; - kid->op_sibling = NULL; - op_free(o); - op_free(kid); - return kkid; - } - } return o; } |