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

[svn:parrot] r33886 - trunk/compilers/pirc/new

From:
kjs
Date:
December 14, 2008 08:29
Subject:
[svn:parrot] r33886 - trunk/compilers/pirc/new
Message ID:
20081214162924.A3E7DCBA12@x12.develooper.com
Author: kjs
Date: Sun Dec 14 08:29:23 2008
New Revision: 33886

Modified:
   trunk/compilers/pirc/new/pirregalloc.c

Log:
[pirc] don't need a separate varaible for iterator; re-use the old one. (saving 4 bytes of stack space)

Modified: trunk/compilers/pirc/new/pirregalloc.c
==============================================================================
--- trunk/compilers/pirc/new/pirregalloc.c	(original)
+++ trunk/compilers/pirc/new/pirregalloc.c	Sun Dec 14 08:29:23 2008
@@ -476,7 +476,6 @@
 void
 linear_scan_register_allocation(lsr_allocator * const lsr) {
     live_interval * i;
-    live_interval *tmp;
     pir_type type = 0; /* types run from 0 to 4; see pircompunit.h */
 
     reset_register_count(lsr);
@@ -514,8 +513,8 @@
         }
 
          /* cache the objects on the list for reuse */
-        for (tmp = lsr->intervals[type]; tmp != NULL; tmp = tmp->nexti)
-            cache_interval_object(lsr, tmp);
+        for (i = lsr->intervals[type]; i != NULL; i = i->nexti)
+            cache_interval_object(lsr, i);
 
         /* clear list of intervals */
         lsr->intervals[type] = NULL;



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