Changeset 22896 for src

Show
Ignore:
Timestamp:
11/06/08 07:18:30 (2 months ago)
Author:
lwall
Message:

[Cursor] Heh, if we bypass TRE to just immediately revert to the stupid old
backoff LTM matcher, STD (precached) can parse itself in half the time! Yow!

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/perl6/Cursor.pmc

    r22894 r22896  
    699699                    $peek =~ s/\t/\\t/g; 
    700700                    $self->deb("looking for $name at --------->$GREEN$peek$CLEAR"); 
     701                } 
     702                if (not defined $_[0]) { 
     703                    my $tried = ""; 
     704                    vec($tried,@pats-1,1) = 0; 
     705                    $_[0] = [$tried, 1_000_000, []]; 
    701706                } 
    702707 
     
    759764                                } 
    760765                            } 
    761                             --$$trylen; 
     766                            if ($$trylen == 1_000_000) { 
     767                                my $max = 0; 
     768                                for my $x (@$rxlens) { $max = $x if $x > $max } 
     769                                $$trylen = $max; 
     770                            } 
     771                            else { 
     772                                --$$trylen; 
     773                            } 
    762774                        } 
    763775