diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-10-11 20:22:08 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-10-11 23:07:36 -0700 |
commit | ef90d20ae1b70bb24316828c3249daee27459a7b (patch) | |
tree | a97bf2827b2c998d0b79c2d57603eca599853a08 /EXTERN.h | |
parent | fa4533d036f96ddb26c693c5b0c642b7cbc7d667 (diff) | |
download | perl-ef90d20ae1b70bb24316828c3249daee27459a7b.tar.gz |
Use const repl optimisation with s///e where possible
In those cases where s///e contains a single variable or a sequence
that is folded to a const op, we can do away with substcont.
PMf_EVAL means that there was an /e. But we don’t actually need to
check that; instead we can just examine the op tree, which we have to
do anyway.
The op tree that s//$x/e and s//"constant"/e compile down to have a
null (a do-block) containing a scope op (block with a single state-
ment, as opposed to op_leave which represents multiple statements)
containing a null followed by the constant or variable.
Diffstat (limited to 'EXTERN.h')
0 files changed, 0 insertions, 0 deletions