From: Stephen McCamant Date: Sun, 12 Jul 1998 17:17:00 +0000 (-0500) Subject: apply patch for smarter AASSIGN_COMMON detection; regen headers X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1167e5dafaeb6f2fafbecb2493434aa60f088f4d;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/op.c b/op.c index 89c70b4..58facaa 100644 --- a/op.c +++ b/op.c @@ -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; } diff --git a/opcode.h b/opcode.h index a1e9174..04680c8 100644 --- a/opcode.h +++ b/opcode.h @@ -2180,7 +2180,7 @@ EXT U32 opargs[] = { 0x00000040, /* padav */ 0x00000040, /* padhv */ 0x00000040, /* padany */ - 0x00000600, /* pushre */ + 0x00000640, /* pushre */ 0x00000144, /* rv2gv */ 0x00000144, /* rv2sv */ 0x00000114, /* av2arylen */ diff --git a/opcode.pl b/opcode.pl index f7e4f76..8544705 100755 --- a/opcode.pl +++ b/opcode.pl @@ -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.