cvsuser 04/05/08 01:27:53
Modified: . PLATFORMS
imcc debug.c instructions.c pbc.c symreg.c symreg.h
Log:
change int consts to INTVAL
Revision Changes Path
1.22 +1 -1 parrot/PLATFORMS
Index: PLATFORMS
===================================================================
RCS file: /cvs/public/parrot/PLATFORMS,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -w -r1.21 -r1.22
--- PLATFORMS 6 May 2004 07:12:45 -0000 1.21
+++ PLATFORMS 8 May 2004 08:27:49 -0000 1.22
@@ -30,7 +30,7 @@
tru64-alpha-dec_c_v5.6 8 Y Y/7
vms
win32-bcc
-win32-cygwin Y*2 Y/49
+win32-cygwin Y Y Y Y
win32-icl_8.0.48 - Y - - - Y Y/2
win32-mingw
win32-ms-cl_13.00.9466 - Y/2 - - - Y Y/2
1.33 +1 -1 parrot/imcc/debug.c
Index: debug.c
===================================================================
RCS file: /cvs/public/parrot/imcc/debug.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -w -r1.32 -r1.33
--- debug.c 17 Jan 2004 12:30:12 -0000 1.32
+++ debug.c 8 May 2004 08:27:52 -0000 1.33
@@ -193,7 +193,7 @@
r->first_ins->index, r->last_ins->index,
r->first_ins->bbindex, r->last_ins->bbindex,
r->set,
- r->color, r->want_regno, r->score,
+ (int)r->color, r->want_regno, r->score,
r->use_count, r->lhs_use_count,
r->reg ? r->reg->name : "",
r->usage
1.60 +4 -4 parrot/imcc/instructions.c
Index: instructions.c
===================================================================
RCS file: /cvs/public/parrot/imcc/instructions.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -w -r1.59 -r1.60
--- instructions.c 23 Apr 2004 09:20:31 -0000 1.59
+++ instructions.c 8 May 2004 08:27:52 -0000 1.60
@@ -391,12 +391,12 @@
if (p->type & (VT_REGP | VT_CONSTP))
p = p->reg;
if (p->color >= 0 && (p->type & VTREGISTER)) {
- sprintf(regb[i], "%c%d", p->set, p->color);
+ sprintf(regb[i], "%c%d", p->set, (int)p->color);
regstr[i] = regb[i];
}
else if (allocated && (optimizer_level & OPT_J) && p->set != 'K' &&
p->color < 0 && (p->type & VTREGISTER)) {
- sprintf(regb[i], "r%c%d", tolower(p->set), -1 - p->color);
+ sprintf(regb[i], "r%c%d", tolower(p->set), -1 - (int)p->color);
regstr[i] = regb[i];
}
else if (p->type & VTREGKEY) {
@@ -404,11 +404,11 @@
for (*regb[i] = '\0'; k; k = k->nextkey) {
if (k->reg && k->reg->color >= 0)
sprintf(regb[i]+strlen(regb[i]), "%c%d",
- k->reg->set, k->reg->color); /* XXX */
+ k->reg->set, (int)k->reg->color); /* XXX */
else if (allocated && (optimizer_level & OPT_J) && k->reg &&
k->reg->color < 0)
sprintf(regb[i]+strlen(regb[i]), "r%c%d",
- tolower(k->reg->set), -1 - k->reg->color);
+ tolower(k->reg->set), -1 - (int)k->reg->color);
else
strcat(regb[i], k->name); /* XXX */
if (k->nextkey)
1.77 +5 -5 parrot/imcc/pbc.c
Index: pbc.c
===================================================================
RCS file: /cvs/public/parrot/imcc/pbc.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -w -r1.76 -r1.77
--- pbc.c 4 May 2004 12:40:46 -0000 1.76
+++ pbc.c 8 May 2004 08:27:52 -0000 1.77
@@ -671,9 +671,9 @@
*pc++ = -1 - r->color;
else
*pc++ = r->color;
- sprintf(s+strlen(s), "%c%d", r->set, r->color);
+ sprintf(s+strlen(s), "%c%d", r->set, (int)r->color);
debug(interpreter, DEBUG_PBC_CONST, " keypart reg %s %c%d\n",
- r->name, r->set, r->color);
+ r->name, r->set, (int)r->color);
break;
case VTCONST:
switch (r->set) {
@@ -685,13 +685,13 @@
break;
case 'I': /* P[;42;..] */
*pc++ = PARROT_ARG_IC; /* int constant */
- *pc++ = r->color = atoi(r->name); /* value */
+ *pc++ = r->color = atol(r->name); /* value */
debug(interpreter, DEBUG_PBC_CONST, " keypart IC %s #%d\n",
r->name, r->color);
break;
default:
fatal(1,"build_key", "unknown set\n");
}
- sprintf(s+strlen(s), "%cc%d", r->set, r->color);
+ sprintf(s+strlen(s), "%cc" INTVAL_FMT, r->set, r->color);
break;
default:
fatal(1,"build_key", "unknown type 0x%x on %s\n",
@@ -721,7 +721,7 @@
else if (r->name[0] == '0' && r->name[1] == 'b')
r->color = strtoul(r->name+2, 0, 2);
else
- r->color = atoi(r->name);
+ r->color = atol(r->name);
break;
case 'S':
r->color = add_const_str(interpreter, r->name);
1.51 +1 -1 parrot/imcc/symreg.c
Index: symreg.c
===================================================================
RCS file: /cvs/public/parrot/imcc/symreg.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -w -r1.50 -r1.51
--- symreg.c 6 May 2004 07:12:48 -0000 1.50
+++ symreg.c 8 May 2004 08:27:52 -0000 1.51
@@ -98,7 +98,7 @@
{
char buf[8192];
int t = s->type;
- sprintf(buf, "symbol [%s] set [%c] color [%d] type [",
+ sprintf(buf, "symbol [%s] set [%c] color [" INTVAL_FMT "] type [",
s->name, s->set, s->color);
if (t & VTCONST) { strcat(buf, "VTCONST "); }
if (t & VTREG) { strcat(buf, "VTREG "); }
1.47 +2 -2 parrot/imcc/symreg.h
Index: symreg.h
===================================================================
RCS file: /cvs/public/parrot/imcc/symreg.h,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -w -r1.46 -r1.47
--- symreg.h 6 May 2004 07:12:48 -0000 1.46
+++ symreg.h 8 May 2004 08:27:52 -0000 1.47
@@ -56,9 +56,9 @@
enum VARTYPE type; /* Variable type */
enum USAGE usage; /* s. USAGE above */
int set; /* Which register set/file it belongs to */
- int color; /* Color: parrot register number
- and parrot const table index of VTCONST */
int want_regno; /* wanted register number */
+ INTVAL color; /* Color: parrot register number
+ and parrot const table index of VTCONST */
int score; /* How costly is to spill this symbol */
int use_count; /* how often is this sym used */
int lhs_use_count; /* how often is this sym written to */