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

plobsing at svn.parrot.org plobsing at svn.parrot.org
Sat Sep 18 03:03:26 UTC 2010


Author: plobsing
Date: Sat Sep 18 03:03:26 2010
New Revision: 49126
URL: https://trac.parrot.org/parrot/changeset/49126

Log:
avoid making string versions of PCC signatures

Modified:
   trunk/compilers/imcc/parser_util.c
   trunk/compilers/imcc/pcc.c

Modified: trunk/compilers/imcc/parser_util.c
==============================================================================
--- trunk/compilers/imcc/parser_util.c	Sat Sep 18 00:48:46 2010	(r49125)
+++ trunk/compilers/imcc/parser_util.c	Sat Sep 18 03:03:26 2010	(r49126)
@@ -267,8 +267,10 @@
         IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
                     "The opcode '%s' needs arguments", name);
 
-    r[0]           = mk_const(interp, r[0]->name, 'P');
-    r[0]->pmc_type = enum_class_FixedIntegerArray;
+    if (r[0]->set == 'S') {
+        r[0]           = mk_const(interp, r[0]->name, 'P');
+        r[0]->pmc_type = enum_class_FixedIntegerArray;
+    }
 
     op_fullname(fullname, name, r, 1, 0);
     op = (op_info_t *)parrot_hash_get(interp, interp->op_hash, fullname);

Modified: trunk/compilers/imcc/pcc.c
==============================================================================
--- trunk/compilers/imcc/pcc.c	Sat Sep 18 00:48:46 2010	(r49125)
+++ trunk/compilers/imcc/pcc.c	Sat Sep 18 03:03:26 2010	(r49126)
@@ -354,7 +354,8 @@
         bufpos--;
     memcpy(buf+bufpos, subf, lensubf);
 
-    regs[0] = mk_const(interp, buf, 'S');
+    regs[0] = mk_const(interp, buf, 'P');
+    regs[0]->pmc_type = enum_class_FixedIntegerArray;
     ins     = insINS(interp, unit, ins, op_name, regs, n + 1);
 
     if (n >= PCC_GET_ARGS_LIMIT) {


More information about the parrot-commits mailing list