diff options
author | Stephen McCamant <smcc@mit.edu> | 1998-07-12 12:17:00 -0500 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-12 22:42:47 +0000 |
commit | 1167e5dafaeb6f2fafbecb2493434aa60f088f4d (patch) | |
tree | 203e5f4c186e964f3a0f41312770077047c4216d | |
parent | a3f9223b8714edf9abd00efc3fc8a087202f1e98 (diff) | |
download | perl-1167e5dafaeb6f2fafbecb2493434aa60f088f4d.tar.gz |
apply patch for smarter AASSIGN_COMMON detection; regen headers
Message-Id: <13737.12300.950886.821143@alias-2.pr.mcs.net>
Subject: [PATCH] @a=@a=qw(1) not working, both 5.004_04 and 5.004_71
p4raw-id: //depot/perl@1458
-rw-r--r-- | op.c | 10 | ||||
-rw-r--r-- | opcode.h | 2 | ||||
-rwxr-xr-x | opcode.pl | 2 |
3 files changed, 12 insertions, 2 deletions
@@ -2223,6 +2223,8 @@ pmruntime(OP *o, OP *expr, OP *repl) curop->op_type == OP_PADANY) { repl_has_vars = 1; } + else if (curop->op_type == OP_PUSHRE) + ; /* Okay here, dangerous in newASSIGNOP */ else break; } @@ -2522,6 +2524,14 @@ newASSIGNOP(I32 flags, OP *left, I32 optype, OP *right) if (lastop->op_type != OP_GV) /* funny deref? */ break; } + else if (curop->op_type == OP_PUSHRE) { + if (((PMOP*)curop)->op_pmreplroot) { + GV *gv = (GV*)((PMOP*)curop)->op_pmreplroot; + if (gv == defgv || SvCUR(gv) == generation) + break; + SvCUR(gv) = generation; + } + } else break; } @@ -2180,7 +2180,7 @@ EXT U32 opargs[] = { 0x00000040, /* padav */ 0x00000040, /* padhv */ 0x00000040, /* padany */ - 0x00000600, /* pushre */ + 0x00000640, /* pushre */ 0x00000144, /* rv2gv */ 0x00000144, /* rv2sv */ 0x00000114, /* av2arylen */ @@ -248,7 +248,7 @@ padav private array ck_null d0 padhv private hash ck_null d0 padany private something ck_null d0 -pushre push regexp ck_null / +pushre push regexp ck_null d/ # References and stuff. |