[svn:parrot] r37919 - trunk/compilers/imcc

petdance at svn.parrot.org petdance at svn.parrot.org
Mon Apr 6 03:40:05 UTC 2009


Author: petdance
Date: Mon Apr  6 03:40:02 2009
New Revision: 37919
URL: https://trac.parrot.org/parrot/changeset/37919

Log:
removed some extraneous code for dealing with nam->color

Modified:
   trunk/compilers/imcc/pbc.c

Modified: trunk/compilers/imcc/pbc.c
==============================================================================
--- trunk/compilers/imcc/pbc.c	Mon Apr  6 03:34:36 2009	(r37918)
+++ trunk/compilers/imcc/pbc.c	Mon Apr  6 03:40:02 2009	(r37919)
@@ -894,7 +894,6 @@
                     }
                 }
                 if (!s1) {
-                    int col;
                     SymReg * const nam = mk_const(interp, fixup->name,
                             fixup->type & VT_ENCODED ? 'U' : 'S');
 
@@ -903,17 +902,15 @@
 
                     interp->code->base.data[addr] = op;
 
-                    if (nam->color >= 0)
-                        col = nam->color;
-                    else
-                        col = nam->color = add_const_str(interp, nam);
+                    if (nam->color < 0)
+                        nam->color = add_const_str(interp, nam);
 
-                    interp->code->base.data[addr+2] = col;
+                    interp->code->base.data[addr+2] = nam->color;
 
                     IMCC_debug(interp, DEBUG_PBC_FIXUP,
                             "fixup const PMC"
                             " find_name sub '%s' const nr: %d\n",
-                            fixup->name, col);
+                            fixup->name, nam->color);
                     continue;
                 }
 


More information about the parrot-commits mailing list