In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/1cd6d13acfba3e377d11d2615c150b3154980a75?hp=d712afe5afc72c55082dadd9818ea5f602ae174f>
- Log ----------------------------------------------------------------- commit 1cd6d13acfba3e377d11d2615c150b3154980a75 Author: Father Chrysostomos <[email protected]> Date: Sat Oct 18 13:50:25 2014 -0700 B::Concise: Give sequence numbers for null ops B::Concise was not giving sequence numbers to null ops even if they were part of the execution order. Ideally, there should be no null ops in the execution order, but, if it did happen, B::Concise was not helpful in debugging it. In fact, its output was quite confusing: 1 <;> nextstate(main 1 -e:1) v ->- You canât tell which ops itâs pointing at and where the optimisations need to be tweaked. (See the thread starting at <[email protected]>.) ----------------------------------------------------------------------- Summary of changes: ext/B/B/Concise.pm | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/ext/B/B/Concise.pm b/ext/B/B/Concise.pm index 96869c7..bef112f 100644 --- a/ext/B/B/Concise.pm +++ b/ext/B/B/Concise.pm @@ -528,29 +528,15 @@ sub sequence { for (; $$op; $op = $op->next) { last if exists $sequence_num{$$op}; my $name = $op->name; - if ($name =~ /^(null|scalar|lineseq|scope)$/) { - next if $oldop and $ {$op->next}; - } else { - $sequence_num{$$op} = $seq_max++; - if (class($op) eq "LOGOP") { - my $other = $op->other; - $other = $other->next while $other->name eq "null"; - sequence($other); - } elsif (class($op) eq "LOOP") { - my $redoop = $op->redoop; - $redoop = $redoop->next while $redoop->name eq "null"; - sequence($redoop); - my $nextop = $op->nextop; - $nextop = $nextop->next while $nextop->name eq "null"; - sequence($nextop); - my $lastop = $op->lastop; - $lastop = $lastop->next while $lastop->name eq "null"; - sequence($lastop); - } elsif ($name eq "subst" and $ {$op->pmreplstart}) { - my $replstart = $op->pmreplstart; - $replstart = $replstart->next while $replstart->name eq "null"; - sequence($replstart); - } + $sequence_num{$$op} = $seq_max++; + if (class($op) eq "LOGOP") { + sequence($op->other); + } elsif (class($op) eq "LOOP") { + sequence($op->redoop); + sequence( $op->nextop); + sequence($op->lastop); + } elsif ($name eq "subst" and $ {$op->pmreplstart}) { + sequence($op->pmreplstart); } $oldop = $op; } -- Perl5 Master Repository
