[kaffe] CVS kaffe (robilad): Cross-compilation fix for verifier
Kaffe CVS
cvs-commits at kaffe.org
Sun Mar 13 06:51:38 PST 2005
PatchSet 5533
Date: 2005/03/13 14:47:06
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
(TUNSTABLE): Made static.
(getTUNSTABLE) Added.
* kaffe/kaffevm/verifier/verify-type.h:
(TUNSTABLE) Removed prototype.
(getTUNSTABLE) Added prototype.
* kaffe/kaffevm/verifier/verify3b.c,
kaffe/kaffevm/verifier/verify.c,
kaffe/kaffevm/verifier/verify-debug.c,
kaffe/kaffevm/verifier/verify-block.c:
Replaced use of TUNSTABLE by getTUNSTABLE.
Members:
ChangeLog:1.3707->1.3708
kaffe/kaffevm/verifier/verify-block.c:1.6->1.7
kaffe/kaffevm/verifier/verify-debug.c:1.2->1.3
kaffe/kaffevm/verifier/verify-type.c:1.9->1.10
kaffe/kaffevm/verifier/verify-type.h:1.6->1.7
kaffe/kaffevm/verifier/verify.c:1.8->1.9
kaffe/kaffevm/verifier/verify3b.c:1.1->1.2
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3707 kaffe/ChangeLog:1.3708
--- kaffe/ChangeLog:1.3707 Sun Mar 13 14:34:54 2005
+++ kaffe/ChangeLog Sun Mar 13 14:47:06 2005
@@ -1,6 +1,16 @@
2005-03-13 Dalibor Topic <robilad at kaffe.org>
* kaffe/kaffevm/verifier/verify-type.c
+ (TUNSTABLE): Made static.
+ (getTUNSTABLE) Added.
+
+ * kaffe/kaffevm/verifier/verify-type.h:
+ (TUNSTABLE) Removed prototype.
+ (getTUNSTABLE) Added prototype.
+
+2005-03-13 Dalibor Topic <robilad at kaffe.org>
+
+ * kaffe/kaffevm/verifier/verify-type.c
(TOBJ): Made static.
(getTOBJ) Added.
Index: kaffe/kaffe/kaffevm/verifier/verify-block.c
diff -u kaffe/kaffe/kaffevm/verifier/verify-block.c:1.6 kaffe/kaffe/kaffevm/verifier/verify-block.c:1.7
--- kaffe/kaffe/kaffevm/verifier/verify-block.c:1.6 Sun Mar 13 14:34:56 2005
+++ kaffe/kaffe/kaffevm/verifier/verify-block.c Sun Mar 13 14:47:11 2005
@@ -52,7 +52,7 @@
binfo->locals = checkPtr(gc_malloc(method->localsz * sizeof(Type), KGC_ALLOC_VERIFIER));
for (i = 0; i < method->localsz; i++) {
- binfo->locals[i] = *TUNSTABLE;
+ binfo->locals[i] = *getTUNSTABLE();
}
} else {
binfo->locals = NULL;
@@ -65,7 +65,7 @@
binfo->opstack = checkPtr(gc_malloc(method->stacksz * sizeof(Type), KGC_ALLOC_VERIFIER));
for (i = 0; i < method->stacksz; i++) {
- binfo->opstack[i] = *TUNSTABLE;
+ binfo->opstack[i] = *getTUNSTABLE();
}
} else {
binfo->opstack = NULL;
@@ -154,7 +154,7 @@
const BlockInfo* block,
const unsigned int n)
{
- if (block->locals[n].data.class == TUNSTABLE->data.class) {
+ if (block->locals[n].data.class == getTUNSTABLE()->data.class) {
return verifyError(v, "attempt to access an unstable local variable");
} else {
return verifyError(v, "attempt to access a local variable not of the correct type");
@@ -268,7 +268,7 @@
opstackPopBlind(BlockInfo* block)
{
block->stacksz--;
- block->opstack[block->stacksz] = *TUNSTABLE;
+ block->opstack[block->stacksz] = *getTUNSTABLE();
}
/*
Index: kaffe/kaffe/kaffevm/verifier/verify-debug.c
diff -u kaffe/kaffe/kaffevm/verifier/verify-debug.c:1.2 kaffe/kaffe/kaffevm/verifier/verify-debug.c:1.3
--- kaffe/kaffe/kaffevm/verifier/verify-debug.c:1.2 Fri Jun 25 14:43:45 2004
+++ kaffe/kaffe/kaffevm/verifier/verify-debug.c Sun Mar 13 14:47:11 2005
@@ -407,7 +407,7 @@
dprintf("(%d)", t->tinfo);
switch(t->tinfo) {
case TINFO_SYSTEM:
- if (type == TUNSTABLE->data.class) {
+ if (type == getTUNSTABLE()->data.class) {
dprintf("TUNSTABLE");
}
else if (isWide(t)) {
Index: kaffe/kaffe/kaffevm/verifier/verify-type.c
diff -u kaffe/kaffe/kaffevm/verifier/verify-type.c:1.9 kaffe/kaffe/kaffevm/verifier/verify-type.c:1.10
--- kaffe/kaffe/kaffevm/verifier/verify-type.c:1.9 Sun Mar 13 14:34:56 2005
+++ kaffe/kaffe/kaffevm/verifier/verify-type.c Sun Mar 13 14:47:11 2005
@@ -27,7 +27,12 @@
* types for type checking (pass 3b)
*/
static Type verify_UNSTABLE;
-Type* TUNSTABLE = &verify_UNSTABLE;
+static Type* TUNSTABLE = &verify_UNSTABLE;
+
+Type* getTUNSTABLE(void)
+{
+ return TUNSTABLE;
+}
static Type verify_INT;
Type* TINT = &verify_INT;
Index: kaffe/kaffe/kaffevm/verifier/verify-type.h
diff -u kaffe/kaffe/kaffevm/verifier/verify-type.h:1.6 kaffe/kaffe/kaffevm/verifier/verify-type.h:1.7
--- kaffe/kaffe/kaffevm/verifier/verify-type.h:1.6 Sun Mar 13 14:34:56 2005
+++ kaffe/kaffe/kaffevm/verifier/verify-type.h Sun Mar 13 14:47:11 2005
@@ -93,7 +93,7 @@
/*
* types for type checking (pass 3b)
*/
-extern Type* TUNSTABLE;
+extern Type* getTUNSTABLE(void);
extern Type* TINT;
extern Type* TFLOAT;
Index: kaffe/kaffe/kaffevm/verifier/verify.c
diff -u kaffe/kaffe/kaffevm/verifier/verify.c:1.8 kaffe/kaffe/kaffevm/verifier/verify.c:1.9
--- kaffe/kaffe/kaffevm/verifier/verify.c:1.8 Sun Mar 13 14:34:56 2005
+++ kaffe/kaffe/kaffevm/verifier/verify.c Sun Mar 13 14:47:11 2005
@@ -666,7 +666,7 @@
return typeErrorInCheckMethodCall(v, argbuf, pc, idx, pool, methSig);
}
- binfo->opstack[paramIndex] = *TUNSTABLE;
+ binfo->opstack[paramIndex] = *getTUNSTABLE();
paramIndex++;
break;
@@ -676,7 +676,7 @@
return typeErrorInCheckMethodCall(v, argbuf, pc, idx, pool, methSig);
}
- binfo->opstack[paramIndex] = *TUNSTABLE;
+ binfo->opstack[paramIndex] = *getTUNSTABLE();
paramIndex++;
break;
@@ -685,7 +685,7 @@
return typeErrorInCheckMethodCall(v, argbuf, pc, idx, pool, methSig);
}
- binfo->opstack[paramIndex] = *TUNSTABLE;
+ binfo->opstack[paramIndex] = *getTUNSTABLE();
paramIndex++;
break;
@@ -695,8 +695,8 @@
return typeErrorInCheckMethodCall(v, argbuf, pc, idx, pool, methSig);
}
- binfo->opstack[paramIndex] = *TUNSTABLE;
- binfo->opstack[paramIndex+ 1] = *TUNSTABLE;
+ binfo->opstack[paramIndex] = *getTUNSTABLE();
+ binfo->opstack[paramIndex+ 1] = *getTUNSTABLE();
paramIndex += 2;
break;
@@ -706,8 +706,8 @@
return typeErrorInCheckMethodCall(v, argbuf, pc, idx, pool, methSig);
}
- binfo->opstack[paramIndex] = *TUNSTABLE;
- binfo->opstack[paramIndex + 1] = *TUNSTABLE;
+ binfo->opstack[paramIndex] = *getTUNSTABLE();
+ binfo->opstack[paramIndex + 1] = *getTUNSTABLE();
paramIndex += 2;
break;
@@ -721,7 +721,7 @@
if (opcode != INVOKESTATIC) {
/* pop object reference off the stack */
binfo->stacksz--;
- binfo->opstack[binfo->stacksz] = *TUNSTABLE;
+ binfo->opstack[binfo->stacksz] = *getTUNSTABLE();
}
Index: kaffe/kaffe/kaffevm/verifier/verify3b.c
diff -u kaffe/kaffe/kaffevm/verifier/verify3b.c:1.1 kaffe/kaffe/kaffevm/verifier/verify3b.c:1.2
--- kaffe/kaffe/kaffevm/verifier/verify3b.c:1.1 Fri Jul 2 19:24:03 2004
+++ kaffe/kaffe/kaffevm/verifier/verify3b.c Sun Mar 13 14:47:11 2005
@@ -216,7 +216,7 @@
newpc = curBlock->locals[n].tinfo;
/* each instance of return address can only be used once */
- curBlock->locals[n] = *TUNSTABLE;
+ curBlock->locals[n] = *getTUNSTABLE();
nextBlock = inWhichBlock(newpc, blocks, v->numBlocks);
if (!mergeBasicBlocks(v, curBlock, nextBlock)) {
More information about the kaffe
mailing list