[svn:parrot] r36692 - trunk/compilers/pirc/src

kjs at svn.parrot.org kjs at svn.parrot.org
Fri Feb 13 21:42:47 UTC 2009


Author: kjs
Date: Fri Feb 13 21:42:46 2009
New Revision: 36692
URL: https://trac.parrot.org/parrot/changeset/36692

Log:
[pirc] remove #if 0 / #endif code.

Modified:
   trunk/compilers/pirc/src/pir.y
   trunk/compilers/pirc/src/pirparser.c

Modified: trunk/compilers/pirc/src/pir.y
==============================================================================
--- trunk/compilers/pirc/src/pir.y	Fri Feb 13 21:33:59 2009	(r36691)
+++ trunk/compilers/pirc/src/pir.y	Fri Feb 13 21:42:46 2009	(r36692)
@@ -3376,30 +3376,8 @@
             }
             else { /* it may be a constant, otherwise it's a label */
 
-/* XXX */
-#if 0
-/* experimental code to integrate constants. Doesn't work properly, this is only
- * 1 spot in which symbol lookups are done; needs to be done everywhere.
- * XXX possibly integrate constdecl and symbol, or represent constdecl's as symbols.
- */
-                constdecl *c = find_global_constant(lexer, operand->expr.id);
-
-                if (c) { /* it's a constant */
-
-                    /* convert the operand to a constant, copy the const value into this. */
-                    operand->type         = EXPR_CONSTANT;
-                    /* allocate a new const; doesn't matter which type/value, overwritten later */
-                    operand->expr.c       = new_const(lexer, INT_VAL, 0); /* dummy value */
-                    operand->expr.c->val  = c->val; /* copy value union */
-                    operand->expr.c->type = c->type; /* copy value type */
-                }
-                else
-#endif
-/* XXX */
-                {
-                    /* it must be a label */
-                    SET_BIT(label_bitmask, BIT(i));
-                }
+                /* it must be a label */
+                SET_BIT(label_bitmask, BIT(i));
             }
         }
     }

Modified: trunk/compilers/pirc/src/pirparser.c
==============================================================================
--- trunk/compilers/pirc/src/pirparser.c	Fri Feb 13 21:33:59 2009	(r36691)
+++ trunk/compilers/pirc/src/pirparser.c	Fri Feb 13 21:42:46 2009	(r36692)
@@ -6146,30 +6146,8 @@
             }
             else { /* it may be a constant, otherwise it's a label */
 
-/* XXX */
-#if 0
-/* experimental code to integrate constants. Doesn't work properly, this is only
- * 1 spot in which symbol lookups are done; needs to be done everywhere.
- * XXX possibly integrate constdecl and symbol, or represent constdecl's as symbols.
- */
-                constdecl *c = find_global_constant(lexer, operand->expr.id);
-
-                if (c) { /* it's a constant */
-
-                    /* convert the operand to a constant, copy the const value into this. */
-                    operand->type         = EXPR_CONSTANT;
-                    /* allocate a new const; doesn't matter which type/value, overwritten later */
-                    operand->expr.c       = new_const(lexer, INT_VAL, 0); /* dummy value */
-                    operand->expr.c->val  = c->val; /* copy value union */
-                    operand->expr.c->type = c->type; /* copy value type */
-                }
-                else
-#endif
-/* XXX */
-                {
-                    /* it must be a label */
-                    SET_BIT(label_bitmask, BIT(i));
-                }
+                /* it must be a label */
+                SET_BIT(label_bitmask, BIT(i));
             }
         }
     }


More information about the parrot-commits mailing list