[kaffe] CVS kaffe (robilad): Cross-compilation fix for verifier
Kaffe CVS
cvs-commits at kaffe.org
Sun Mar 13 09:03:26 PST 2005
PatchSet 5545
Date: 2005/03/13 16:54:35
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Cross-compilation fix for verifier
2005-03-13 Dalibor Topic <robilad at kaffe.org>
* kaffe/kaffevm/verifier/verify-type.c
(TDOUBLE): Made static.
(getTDOUBLE) Added.
* kaffe/kaffevm/verifier/verify-type.h:
(TDOUBLE) Removed prototype.
(getTDOUBLE) Added prototype.
* kaffe/kaffevm/verifier/verify.c,
kaffe/kaffevm/verifier/verify-block.c:
Replaced use of TDOUBLE by getTDOUBLE.
Members:
ChangeLog:1.3719->1.3720
kaffe/kaffevm/verifier/verify-block.c:1.18->1.19
kaffe/kaffevm/verifier/verify-debug.c:1.11->1.12
kaffe/kaffevm/verifier/verify-type.c:1.21->1.22
kaffe/kaffevm/verifier/verify-type.h:1.18->1.19
kaffe/kaffevm/verifier/verify.c:1.9->1.10
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3719 kaffe/ChangeLog:1.3720
--- kaffe/ChangeLog:1.3719 Sun Mar 13 16:47:19 2005
+++ kaffe/ChangeLog Sun Mar 13 16:54:35 2005
@@ -1,6 +1,20 @@
2005-03-13 Dalibor Topic <robilad at kaffe.org>
* kaffe/kaffevm/verifier/verify-type.c
+ (TDOUBLE): Made static.
+ (getTDOUBLE) Added.
+
+ * kaffe/kaffevm/verifier/verify-type.h:
+ (TDOUBLE) Removed prototype.
+ (getTDOUBLE) Added prototype.
+
+ * kaffe/kaffevm/verifier/verify.c,
+ kaffe/kaffevm/verifier/verify-block.c:
+ Replaced use of TDOUBLE by getTDOUBLE.
+
+2005-03-13 Dalibor Topic <robilad at kaffe.org>
+
+ * kaffe/kaffevm/verifier/verify-type.c
(TNULL): Made static.
(getTNULL) Added.
Index: kaffe/kaffe/kaffevm/verifier/verify-block.c
diff -u kaffe/kaffe/kaffevm/verifier/verify-block.c:1.18 kaffe/kaffe/kaffevm/verifier/verify-block.c:1.19
--- kaffe/kaffe/kaffevm/verifier/verify-block.c:1.18 Sun Mar 13 16:47:20 2005
+++ kaffe/kaffe/kaffevm/verifier/verify-block.c Sun Mar 13 16:54:44 2005
@@ -513,7 +513,7 @@
case DCONST_0:
case DCONST_1:
- OPSTACK_WPUSH(TDOUBLE);
+ OPSTACK_WPUSH(getTDOUBLE());
break;
@@ -543,7 +543,7 @@
if (tag == CONSTANT_Long) {
OPSTACK_WPUSH(TLONG);
} else {
- OPSTACK_WPUSH(TDOUBLE);
+ OPSTACK_WPUSH(getTDOUBLE());
}
break;
@@ -688,8 +688,8 @@
case DLOAD:
GET_CONST_INDEX;
DLOAD_common:
- ENSURE_LOCAL_WTYPE(idx, TDOUBLE);
- OPSTACK_WPUSH(TDOUBLE);
+ ENSURE_LOCAL_WTYPE(idx, getTDOUBLE());
+ OPSTACK_WPUSH(getTDOUBLE());
break;
@@ -701,8 +701,8 @@
case DSTORE:
GET_CONST_INDEX;
DSTORE_common:
- OPSTACK_WPOP_T(TDOUBLE);
- block->locals[idx] = *TDOUBLE;
+ OPSTACK_WPOP_T(getTDOUBLE());
+ block->locals[idx] = *getTDOUBLE();
block->locals[idx + 1] = *TWIDE;
break;
@@ -787,7 +787,7 @@
case SALOAD: ARRAY_LOAD(TINT, getTSHORTARR()); break;
case LALOAD: ARRAY_WLOAD(TLONG, getTLONGARR()); break;
- case DALOAD: ARRAY_WLOAD(TDOUBLE, getTDOUBLEARR()); break;
+ case DALOAD: ARRAY_WLOAD(getTDOUBLE(), getTDOUBLEARR()); break;
#undef ARRAY_LOAD
#undef ARRAY_WLOAD
@@ -872,7 +872,7 @@
case SASTORE: ARRAY_STORE(TINT, getTSHORTARR()); break;
case LASTORE: ARRAY_WSTORE(TLONG, getTLONGARR()); break;
- case DASTORE: ARRAY_WSTORE(TDOUBLE, getTDOUBLEARR()); break;
+ case DASTORE: ARRAY_WSTORE(getTDOUBLE(), getTDOUBLEARR()); break;
#undef ARRAY_STORE
#undef ARRAY_WSTORE
@@ -929,10 +929,10 @@
case DADD: case DSUB: case DDIV: case DMUL: case DREM:
- OPSTACK_WPOP_T(TDOUBLE);
+ OPSTACK_WPOP_T(getTDOUBLE());
break;
case DNEG:
- OPSTACK_WPEEK_T(TDOUBLE);
+ OPSTACK_WPEEK_T(getTDOUBLE());
break;
@@ -951,8 +951,8 @@
case DCMPG:
case DCMPL:
- OPSTACK_WPOP_T(TDOUBLE);
- OPSTACK_WPOP_T(TDOUBLE);
+ OPSTACK_WPOP_T(getTDOUBLE());
+ OPSTACK_WPOP_T(getTDOUBLE());
opstackPushBlind(block, TINT);
break;
@@ -992,7 +992,7 @@
case I2D:
OPSTACK_POP_T(TINT);
CHECK_STACK_OVERFLOW(2);
- opstackWPushBlind(block, TDOUBLE);
+ opstackWPushBlind(block, getTDOUBLE());
break;
case F2I:
@@ -1005,7 +1005,7 @@
break;
case F2D:
OPSTACK_POP_T(TFLOAT);
- OPSTACK_WPUSH(TDOUBLE);
+ OPSTACK_WPUSH(getTDOUBLE());
break;
case L2I:
@@ -1018,19 +1018,19 @@
break;
case L2D:
OPSTACK_WPOP_T(TLONG);
- opstackWPushBlind(block, TDOUBLE);
+ opstackWPushBlind(block, getTDOUBLE());
break;
case D2I:
- OPSTACK_WPOP_T(TDOUBLE);
+ OPSTACK_WPOP_T(getTDOUBLE());
opstackPushBlind(block, TINT);
break;
case D2F:
- OPSTACK_WPOP_T(TDOUBLE);
+ OPSTACK_WPOP_T(getTDOUBLE());
opstackPushBlind(block, TFLOAT);
break;
case D2L:
- OPSTACK_WPOP_T(TDOUBLE);
+ OPSTACK_WPOP_T(getTDOUBLE());
opstackWPushBlind(block, TLONG);
break;
@@ -1199,7 +1199,7 @@
case 'F': opstackPushBlind(block, TFLOAT); break;
case 'J': OPSTACK_WPUSH(TLONG); break;
- case 'D': OPSTACK_WPUSH(TDOUBLE); break;
+ case 'D': OPSTACK_WPUSH(getTDOUBLE()); break;
case '[':
case 'L':
@@ -1239,7 +1239,7 @@
case 'F': OPSTACK_POP_T_BLIND(TFLOAT); break;
case 'J': OPSTACK_WPOP_T_BLIND(TLONG); break;
- case 'D': OPSTACK_WPOP_T_BLIND(TDOUBLE); break;
+ case 'D': OPSTACK_WPOP_T_BLIND(getTDOUBLE()); break;
case '[':
case 'L':
@@ -1286,7 +1286,7 @@
case 'F': OPSTACK_POP_T_BLIND(TFLOAT); break;
case 'J': OPSTACK_WPOP_T_BLIND(TLONG); break;
- case 'D': OPSTACK_WPOP_T_BLIND(TDOUBLE); break;
+ case 'D': OPSTACK_WPOP_T_BLIND(getTDOUBLE()); break;
case '[':
case 'L':
@@ -1406,7 +1406,7 @@
}
break;
case DRETURN:
- OPSTACK_WPEEK_T(TDOUBLE);
+ OPSTACK_WPEEK_T(getTDOUBLE());
sig = getMethodReturnSig(v->method);
if (strcmp(sig, "D")) {
return verifyError(v, "dreturn: method doesn't return a double");
Index: kaffe/kaffe/kaffevm/verifier/verify-debug.c
diff -u kaffe/kaffe/kaffevm/verifier/verify-debug.c:1.11 kaffe/kaffe/kaffevm/verifier/verify-debug.c:1.12
--- kaffe/kaffe/kaffevm/verifier/verify-debug.c:1.11 Sun Mar 13 16:15:54 2005
+++ kaffe/kaffe/kaffevm/verifier/verify-debug.c Sun Mar 13 16:54:44 2005
@@ -432,7 +432,7 @@
else if (type == TFLOAT->data.class) {
dprintf("TFLOAT");
}
- else if (type == TDOUBLE->data.class) {
+ else if (type == getTDOUBLE()->data.class) {
dprintf("TDOUBLE");
}
else {
Index: kaffe/kaffe/kaffevm/verifier/verify-type.c
diff -u kaffe/kaffe/kaffevm/verifier/verify-type.c:1.21 kaffe/kaffe/kaffevm/verifier/verify-type.c:1.22
--- kaffe/kaffe/kaffevm/verifier/verify-type.c:1.21 Sun Mar 13 16:47:20 2005
+++ kaffe/kaffe/kaffevm/verifier/verify-type.c Sun Mar 13 16:54:44 2005
@@ -44,7 +44,12 @@
Type* TLONG = &verify_LONG;
static Type verify_DOUBLE;
-Type* TDOUBLE = &verify_DOUBLE;
+static Type* TDOUBLE = &verify_DOUBLE;
+
+Type* getTDOUBLE(void)
+{
+ return TDOUBLE;
+}
/* used for the second space of LONGs and DOUBLEs
* in local variables or on the operand stack
Index: kaffe/kaffe/kaffevm/verifier/verify-type.h
diff -u kaffe/kaffe/kaffevm/verifier/verify-type.h:1.18 kaffe/kaffe/kaffevm/verifier/verify-type.h:1.19
--- kaffe/kaffe/kaffevm/verifier/verify-type.h:1.18 Sun Mar 13 16:47:20 2005
+++ kaffe/kaffe/kaffevm/verifier/verify-type.h Sun Mar 13 16:54:44 2005
@@ -98,7 +98,7 @@
extern Type* TINT;
extern Type* TFLOAT;
extern Type* TLONG;
-extern Type* TDOUBLE;
+extern Type* getTDOUBLE(void);
extern Type* getTNULL(void);
extern Type* TWIDE;
Index: kaffe/kaffe/kaffevm/verifier/verify.c
diff -u kaffe/kaffe/kaffevm/verifier/verify.c:1.9 kaffe/kaffe/kaffevm/verifier/verify.c:1.10
--- kaffe/kaffe/kaffevm/verifier/verify.c:1.9 Sun Mar 13 14:47:11 2005
+++ kaffe/kaffe/kaffevm/verifier/verify.c Sun Mar 13 16:54:44 2005
@@ -701,7 +701,7 @@
break;
case 'D':
- if (binfo->opstack[paramIndex].data.class != TDOUBLE->data.class ||
+ if (binfo->opstack[paramIndex].data.class != getTDOUBLE()->data.class ||
!isWide(&binfo->opstack[paramIndex + 1])) {
return typeErrorInCheckMethodCall(v, argbuf, pc, idx, pool, methSig);
}
@@ -759,7 +759,7 @@
break;
case 'D':
- binfo->opstack[binfo->stacksz] = *TDOUBLE;
+ binfo->opstack[binfo->stacksz] = *getTDOUBLE();
binfo->opstack[binfo->stacksz + 1] = *TWIDE;
binfo->stacksz += 2;
break;
@@ -868,7 +868,7 @@
if (paramCount + 1 > v->method->localsz) {
return localOverflowErrorInLoadInitialArgs(v, argbuf);
}
- locals[paramCount] = *TDOUBLE;
+ locals[paramCount] = *getTDOUBLE();
locals[paramCount+1] = *TWIDE;
paramCount += 2;
break;
More information about the kaffe
mailing list