[svn:parrot] r45217 - branches/profiling_testing/runtime/parrot/library/ProfTest

cotto at svn.parrot.org cotto at svn.parrot.org
Sat Mar 27 23:56:28 UTC 2010


Author: cotto
Date: Sat Mar 27 23:56:28 2010
New Revision: 45217
URL: https://trac.parrot.org/parrot/changeset/45217

Log:
[profiling] code cleanup

Modified:
   branches/profiling_testing/runtime/parrot/library/ProfTest/Matcher.nqp

Modified: branches/profiling_testing/runtime/parrot/library/ProfTest/Matcher.nqp
==============================================================================
--- branches/profiling_testing/runtime/parrot/library/ProfTest/Matcher.nqp	Sat Mar 27 23:18:30 2010	(r45216)
+++ branches/profiling_testing/runtime/parrot/library/ProfTest/Matcher.nqp	Sat Mar 27 23:56:28 2010	(r45217)
@@ -20,10 +20,14 @@
     my $line_idx   := 0;
     my $want_idx   := 0;
 
-    my $curr_line := $profile.profile_array[$line_idx];
-    my $curr_want := self<wants>[$want_idx];
+    my $curr_line;
+    my $curr_want;
 
     while (11) {
+
+        $curr_line := $profile.profile_array[$line_idx];
+        $curr_want := self<wants>[$want_idx];
+
         if $curr_want.goal {
             return 1;
         }
@@ -32,16 +36,12 @@
             @backtracks.push( [$line_idx+1, $want_idx] );
             $line_idx++;
             $want_idx++;
-            $curr_line := $profile.profile_array[$line_idx];
-            $curr_want := self<wants>[$want_idx];
         }
         else {
             if !@backtracks {
                 return 0;
             }
             ($curr_want, $curr_line) := @backtracks.pop;
-            $curr_line := $profile.profile_array[$line_idx];
-            $curr_want := self<wants>[$want_idx];
         }
     }
 }


More information about the parrot-commits mailing list