develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34369 - trunk/src

From:
petdance
Date:
December 25, 2008 22:55
Subject:
[svn:parrot] r34369 - trunk/src
Message ID:
20081226065513.A5D05CBA12@x12.develooper.com
Author: petdance
Date: Thu Dec 25 22:55:12 2008
New Revision: 34369

Modified:
   trunk/src/jit.c

Log:
localizing j loop variable

Modified: trunk/src/jit.c
==============================================================================
--- trunk/src/jit.c	(original)
+++ trunk/src/jit.c	Thu Dec 25 22:55:12 2008
@@ -393,7 +393,7 @@
 static void
 init_regusage(PARROT_INTERP, Parrot_jit_optimizer_section_ptr cur_section)
 {
-    int typ, j;
+    int typ;
 
     cur_section->ru[0].registers_used =
         CONTEXT(interp)->n_regs_used[REGNO_INT];
@@ -401,9 +401,11 @@
         CONTEXT(interp)->n_regs_used[REGNO_NUM];
     cur_section->ru[1].registers_used =
         cur_section->ru[2].registers_used = 0;
-    for (typ = 0; typ < 4; typ++)
+    for (typ = 0; typ < 4; typ++) {
+        int j;
         for (j = 0; j < cur_section->ru[typ].registers_used; j++)
             cur_section->ru[typ].reg_usage[j] = j;
+    }
 }
 
 /*



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About