cvsuser 03/02/21 05:28:50
Modified: languages/imcc imc.c imcc.l
Log:
fix line numbers
Revision Changes Path
1.36 +9 -3 parrot/languages/imcc/imc.c
Index: imc.c
===================================================================
RCS file: /cvs/public/parrot/languages/imcc/imc.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -w -r1.35 -r1.36
--- imc.c 21 Feb 2003 12:26:39 -0000 1.35
+++ imc.c 21 Feb 2003 13:28:50 -0000 1.36
@@ -12,6 +12,7 @@
*/
#include <string.h>
+#include <assert.h>
#include "imc.h"
#include "optimizer.h"
#include "parrot/jit.h"
@@ -747,9 +748,13 @@
int to_map[] = { 4, 0, 0, 4 };
const char *types = "IPSN";
Instruction * ins, *next, *last, *tmp, *prev;
- SymReg * r, *cpu[4+4], *regs[IMCC_MAX_REGS]; /* XXX */
- int reads[4+4], writes[4+4], nr, nw;
- static SymReg *par[4+4]; /* XXX */
+ SymReg * r, *cpu[64], *regs[IMCC_MAX_REGS]; /* XXX */
+ /* TODO
+ * cpu, par, reads, writes may be more then the actual mapped registers
+ * because register get reused and may have the same color
+ */
+ int reads[64], writes[64], nr, nw;
+ static SymReg *par[64]; /* XXX */
static int ncpu;
for (j = 0; j < ncpu; j++)
@@ -767,6 +772,7 @@
}
}
}
+ assert(ncpu <= 64);
/* generate a list of parrot registers */
for (j = 0; j < ncpu; j++) {
par[j] = malloc(sizeof(SymReg));
1.30 +1 -1 parrot/languages/imcc/imcc.l
Index: imcc.l
===================================================================
RCS file: /cvs/public/parrot/languages/imcc/imcc.l,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -w -r1.29 -r1.30
--- imcc.l 18 Feb 2003 13:25:10 -0000 1.29
+++ imcc.l 21 Feb 2003 13:28:50 -0000 1.30
@@ -105,7 +105,7 @@
if (expect_pasm == 2)
BEGIN(INITIAL);
expect_pasm = 0;
- if (frames) line++;
+ line++;
return '\n';
}