This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pmruntime: make more use of Perl_re_op_compile
authorDavid Mitchell <davem@iabyn.com>
Wed, 28 Mar 2012 08:44:01 +0000 (09:44 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 13 Jun 2012 12:32:49 +0000 (13:32 +0100)
commite485beb85b12595f4a784d37e5f42d36644128ba
tree7b66af964f4e99b07c2e223795121605a5a57332
parent0547a7295c4c0072f6e77ff07650c554c64fbbd8
pmruntime: make more use of Perl_re_op_compile

In the compile-time, non-code branch of pmruntime(), rather than
assembling the pattern string ourselves from the list of constant strings,
just pass the whole thing to Perl_re_op_compile() (or whatever eng->op_comp
is in scope) to assemble.

This has two benefits. First it avoids duplicating the concatenation code
(which already has to be present in Perl_re_op_compile), and it provides
more information to that function; in particular so that we can identify
a late-bound compile-time pattern, i.e. $foo =~ 'string-not-regex'.
op.c