diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-08-27 21:48:55 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-08-27 21:48:55 +0100 |
commit | ac56e7de46621c6f2e373d11984c0a0fe4839b0b (patch) | |
tree | bb3bb0453fad0152bd4b0aaf97989c0c21cb192f /symbian/symbian_stubs.h | |
parent | ccfef76d964c8b719db5c7fd06ce897a3eb64c01 (diff) | |
download | perl-ac56e7de46621c6f2e373d11984c0a0fe4839b0b.tar.gz |
Peephole optimise adjacent pairs of nextstate ops.
Previously, in code such as
use constant DEBUG=>0;
sub GAK {
warn if DEBUG;
print "stuff\n";
}
the ops for C<warn if DEBUG;> would be folded to a null op (ex-const), but
the nextstate op would remain, resulting in a runtime op dispatch of nextstate,
nextstate, ...
The execution of a sequence of nexstate ops is indistinguishable from just the
last nextstate op, so teach the peephole optimiser to eliminate the first of a
pair of nextstate ops. (Except where the first carries a label, as labels
mustn't be eliminated by the optimiser, and label usage isn't conclusively
known at compile time.)
Diffstat (limited to 'symbian/symbian_stubs.h')
0 files changed, 0 insertions, 0 deletions