summaryrefslogtreecommitdiff
path: root/embed.fnc
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2011-11-04 10:12:20 +0000
committerDavid Mitchell <davem@iabyn.com>2012-06-13 13:25:52 +0100
commit9f141731d83a1ac6294a5580a5b11ff41490309a (patch)
treee71949f74544a981f3b594d10dc601589aa91740 /embed.fnc
parent867940b89f1d3f001a6df1d888925b9ca246fe96 (diff)
downloadperl-9f141731d83a1ac6294a5580a5b11ff41490309a.tar.gz
Move bulk of pp_regcomp() into re_op_compile()
When called, pp_regcomp() is presented with a list of SVs on the stack. Previously, it would perform (amongst other things): * overloading those SVs; * concatenating them; * detection of bare /$qr/; * detection of unchanged pattern; optionally followed by a call to the built-in or an external regexp compiler. Since we want to avoid premature concatenation (so that we can handle /$runtime(?{...})/), move all these activities from pp_regcomp() into re_op_compile(). This makes re_op_compile() a bit cumbersome, with a large arg list, but I haven't found any way of only moving only a subset of the above. Note that a side-effect of this is that qr-overloading now works for all regex compilations, not just those reached via pp_regcomp(); in particular this now invokes the qr method rather than the "" method if available: /(??{ $overloaded_object })/
Diffstat (limited to 'embed.fnc')
-rw-r--r--embed.fnc7
1 files changed, 5 insertions, 2 deletions
diff --git a/embed.fnc b/embed.fnc
index 128cc68d8e..0fe55c6a5c 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1058,8 +1058,11 @@ Ap |void* |regdupe_internal|NN REGEXP * const r|NN CLONE_PARAMS* param
#endif
p |regexp_engine*|current_re_engine
Ap |REGEXP*|pregcomp |NN SV * const pattern|const U32 flags
-p |REGEXP*|re_op_compile |NULLOK SV * const * const patternp \
- |int pat_count|NULLOK OP *expr|U32 flags
+p |REGEXP*|re_op_compile |NULLOK SV ** const patternp \
+ |int pat_count|NULLOK OP *expr \
+ |NULLOK const regexp_engine* eng \
+ |NULLOK REGEXP *old_re|NULLOK int *is_bare_re \
+ |U32 flags
Ap |REGEXP*|re_compile |NN SV * const pattern|U32 flags
Ap |char* |re_intuit_start|NN REGEXP * const rx|NULLOK SV* sv|NN char* strpos \
|NN char* strend|const U32 flags \