summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2004-07-14 23:35:24 +0000
committerNicholas Clark <nick@ccl4.org>2004-07-14 23:35:24 +0000
commitc491ecac864a369a2913fd8e3ff31636a481b18b (patch)
tree0242c9b8916edc769fa6e7a085a47fca4a1f2472 /op.c
parentef3e5ea91ec4f974a02ae36f5bcc9e91bcab852f (diff)
downloadperl-c491ecac864a369a2913fd8e3ff31636a481b18b.tar.gz
"That's the way to do it"
In taking out a bug spotted by my regression tests in t/cmd/for.t I actually managed to disable the entire optimisation. Which means that I didn't find the other bug. This optimisation is live, and passes all tests. p4raw-id: //depot/perl@23109
Diffstat (limited to 'op.c')
-rw-r--r--op.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/op.c b/op.c
index d4c28874a7..8ceaa095ba 100644
--- a/op.c
+++ b/op.c
@@ -6751,17 +6751,17 @@ Perl_peep(pTHX_ register OP *o)
if (!theirmark || theirmark->op_type != OP_PUSHMARK)
break;
- ourmark = ((LISTOP *)o)->op_first;
- if (!ourmark || ourmark->op_type != OP_PUSHMARK)
- break;
-
- if (ourmark->op_next != o) {
+ if (theirmark->op_sibling != o) {
/* There's something between the mark and the reverse, eg
for (1, reverse (...))
so no go. */
break;
}
+ ourmark = ((LISTOP *)o)->op_first;
+ if (!ourmark || ourmark->op_type != OP_PUSHMARK)
+ break;
+
ourlast = ((LISTOP *)o)->op_last;
if (!ourlast || ourlast->op_next != o)
break;