develooper Front page | perl.cvs.parrot | Postings from January 2009

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

From:
kjs
Date:
January 3, 2009 09:15
Subject:
[svn:parrot] r34894 - trunk/compilers/pirc/new
Message ID:
20090103171546.4857ECB9FA@x12.develooper.com
Author: kjs
Date: Sat Jan  3 09:15:45 2009
New Revision: 34894

Modified:
   trunk/compilers/pirc/new/pircompunit.c
   trunk/compilers/pirc/new/piremit.c

Log:
[pirc] add a comment so I don't forget, and cleanup.

Modified: trunk/compilers/pirc/new/pircompunit.c
==============================================================================
--- trunk/compilers/pirc/new/pircompunit.c	(original)
+++ trunk/compilers/pirc/new/pircompunit.c	Sat Jan  3 09:15:45 2009
@@ -1344,6 +1344,20 @@
         new_sub_instr(lexer, PARROT_OP_set_p_pc, "set_p_pc", 0);
         push_operand(lexer, expr_from_target(lexer, consttarg));
         push_operand(lexer, expr_from_const(lexer, value));
+
+        /* XXXX
+
+        Don't generate that instruction if the constant is never referenced.
+        This is true for all variants (pmc, int, string, num) in this function.
+
+        As the constant is declared as a .local (see above), it will only
+        be assigned a color (register) iff the symbol is referenced (looked up
+        for the first time).
+
+        XXX fix this.
+
+
+        */
     }
 
     else if (value->type == INT_VAL) {

Modified: trunk/compilers/pirc/new/piremit.c
==============================================================================
--- trunk/compilers/pirc/new/piremit.c	(original)
+++ trunk/compilers/pirc/new/piremit.c	Sat Jan  3 09:15:45 2009
@@ -464,10 +464,9 @@
 */
 static void
 emit_pbc_const_arg(lexer_state * const lexer, constant * const c) {
-    fprintf(stderr, "emit pbc const arg\n");
+
     switch (c->type) {
         case INT_VAL:
-            fprintf(stderr, "INTVAL\n");
             emit_int_arg(lexer->bc, c->val.ival);
             break;
         case NUM_VAL: {



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