summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2012-10-17 19:45:38 +0100
committerDavid Mitchell <davem@iabyn.com>2012-11-10 13:39:32 +0000
commit4e09461c68f4fd1b02cb93ceb753e6d3b4f6b786 (patch)
tree3fd8c89caaea42fba0cda4b24b17b5e83156ad22 /op.c
parenta7fd8ef68b459a13ba95615ec125e2e7ba656b47 (diff)
downloadperl-4e09461c68f4fd1b02cb93ceb753e6d3b4f6b786.tar.gz
add SAVEt_CLEARPADRANGE
Add a new save type that does the equivalent of multiple SAVEt_CLEARSV's for a given target range. This makes the new padange op more efficient.
Diffstat (limited to 'op.c')
-rw-r--r--op.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/op.c b/op.c
index bf1a4c69c6..af6a6b0082 100644
--- a/op.c
+++ b/op.c
@@ -11007,6 +11007,12 @@ Perl_rpeep(pTHX_ register OP *o)
if (count >= OPpPADRANGE_COUNTMASK)
break;
+ /* there's a biggest base we can fit into a
+ * SAVEt_CLEARPADRANGE in pp_padrange */
+ if (intro && base >
+ (UV_MAX >> (OPpPADRANGE_COUNTSHIFT+SAVE_TIGHT_SHIFT)))
+ break;
+
/* Success! We've got another valid pad op to optimise away */
count++;
followop = p->op_next;