Changeset 22014 for src/perl6

Show
Ignore:
Timestamp:
08/22/08 20:19:17 (3 months ago)
Author:
lwall
Message:

[Cursor] another speed tweak. Now compiles STD.pm in <30sec if cache is precomputed

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/perl6/Cursor.pmc

    r22013 r22014  
    629629                            $C->deb("LAST: $last\n") if $DEBUG & DEBUG::lexer; 
    630630                            $result = $fates->[$last-1]; 
    631                             for my $x (1 .. $max) { 
    632                                 my $beg = $-[$x]; 
    633                                 next unless defined $beg; 
    634                                 my $end = $+[$x]; 
    635 #                               return if $stoplen >= $end - $beg; 
    636                                 my $f = $fates->[$x-1][3]; 
    637                                 no strict 'refs'; 
    638                                 if ($DEBUG & DEBUG::fates or ($DEBUG & DEBUG::lexer and $x == $last)) { 
    639                                     my $p = $pats[$x-1] // '<nopat>'; 
    640                                     $self->deb("\$$x: $beg..$end\t$$x\t ", 
    641                                         $x == $last ? "====>" : "---->", 
    642                                         " $f\t/$p/"); 
     631                            if ($DEBUG) { 
     632                                for my $x (1 .. $max) { 
     633                                    my $beg = $-[$x]; 
     634                                    next unless defined $beg; 
     635                                    my $end = $+[$x]; 
     636    #                           return if $stoplen >= $end - $beg; 
     637                                    my $f = $fates->[$x-1][3]; 
     638                                    no strict 'refs'; 
     639                                    if ($DEBUG & DEBUG::fates or ($DEBUG & DEBUG::lexer and $x == $last)) { 
     640                                        my $p = $pats[$x-1] // '<nopat>'; 
     641                                        $self->deb("\$$x: $beg..$end\t$$x\t ", 
     642                                            $x == $last ? "====>" : "---->", 
     643                                            " $f\t/$p/"); 
     644                                    } 
    643645                                } 
     646                                $C->deb("success at '", substr($$buf,$C->{_pos},10), "'") if $DEBUG & DEBUG::lexer; 
    644647                            } 
    645                             $C->deb("success at '", substr($$buf,$C->{_pos},10), "'") if $DEBUG & DEBUG::lexer; 
    646648                            my $tried = ""; 
    647649                            vec($tried,$last-1,1) = 1;