# New Ticket Created by  Tony Payne 
# Please include the string:  [netlabs #617]
# in the subject line of all future correspondence about this issue. 
# <URL: http://bugs6.perl.org/rt2/Ticket/Display.html?id=617 >



Fixed some minor bugs w/ the Optimizer, having to do mainly with
handling of labels.  Especially problematic were lines w/ a label, but
no instruction.


Index: lib/Parrot/Optimizer.pm
===================================================================
RCS file: /cvs/public/parrot/lib/Parrot/Optimizer.pm,v
retrieving revision 1.2
diff -r1.2 Optimizer.pm
28a29
>   my $ln = 0;
29a31
>     $ln++;
45c47
<     if(s/^(\w+):\s+//) {
---
>     if(s/^(\w+):\s*//) {
56c58,59
<       if(s/^([a-zA-Z][a-zA-Z0-9]+)//) {                # global label
---
>       my $current_line = $_;
>       if(s/^(\w+)//) {                                 # global label
76a80,83
>       s/^#.*$//;# Remove the optional comment
>       if($_ eq $current_line) {
>           die "Unable to parse input at line $ln: $_\n";
>       }
336c343
<     next if $_->{blank} or $_->{comment};
---
>     next if $_->{blank} or $_->{comment} or !$_->{instruction};
344a352
>     next unless $lines->[$i]{instruction};


Reply via email to