diff options
author | David Mitchell <davem@iabyn.com> | 2011-11-04 10:12:20 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2012-06-13 13:25:52 +0100 |
commit | 9f141731d83a1ac6294a5580a5b11ff41490309a (patch) | |
tree | e71949f74544a981f3b594d10dc601589aa91740 /embed.h | |
parent | 867940b89f1d3f001a6df1d888925b9ca246fe96 (diff) | |
download | perl-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.h')
-rw-r--r-- | embed.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1175,7 +1175,7 @@ #define parser_free(a) Perl_parser_free(aTHX_ a) #define peep(a) Perl_peep(aTHX_ a) #define pmruntime(a,b,c,d) Perl_pmruntime(aTHX_ a,b,c,d) -#define re_op_compile(a,b,c,d) Perl_re_op_compile(aTHX_ a,b,c,d) +#define re_op_compile(a,b,c,d,e,f,g) Perl_re_op_compile(aTHX_ a,b,c,d,e,f,g) #define refcounted_he_chain_2hv(a,b) Perl_refcounted_he_chain_2hv(aTHX_ a,b) #define refcounted_he_fetch_pv(a,b,c,d) Perl_refcounted_he_fetch_pv(aTHX_ a,b,c,d) #define refcounted_he_fetch_pvn(a,b,c,d,e) Perl_refcounted_he_fetch_pvn(aTHX_ a,b,c,d,e) |