[kaffe] CVS kaffe (robilad): Cross-compilation fix for verifier

Kaffe CVS cvs-commits at kaffe.org
Sun Mar 13 06:40:12 PST 2005


PatchSet 5532 
Date: 2005/03/13 14:34:54
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
        (TOBJ): Made static.
        (getTOBJ) Added.

        * kaffe/kaffevm/verifier/verify-type.h:
        (TOBJ) Removed prototype.
        (getTOBJ) Added prototype.

        * kaffe/kaffevm/verifier/verify-block.c (verifyBasicBlock),
        kaffe/kaffevm/verifier/verify.c (checkMethodCall):
        Use getTOBJ instead of using TOBJ directly.

Members: 
	ChangeLog:1.3706->1.3707 
	kaffe/kaffevm/verifier/verify-block.c:1.5->1.6 
	kaffe/kaffevm/verifier/verify-type.c:1.8->1.9 
	kaffe/kaffevm/verifier/verify-type.h:1.5->1.6 
	kaffe/kaffevm/verifier/verify.c:1.7->1.8 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3706 kaffe/ChangeLog:1.3707
--- kaffe/ChangeLog:1.3706	Sun Mar 13 12:57:21 2005
+++ kaffe/ChangeLog	Sun Mar 13 14:34:54 2005
@@ -1,5 +1,19 @@
 2005-03-13  Dalibor Topic  <robilad at kaffe.org>
 
+	* kaffe/kaffevm/verifier/verify-type.c
+	(TOBJ): Made static. 
+	(getTOBJ) Added.
+
+	* kaffe/kaffevm/verifier/verify-type.h: 
+	(TOBJ) Removed prototype.
+	(getTOBJ) Added prototype.
+
+	* kaffe/kaffevm/verifier/verify-block.c (verifyBasicBlock), 
+	kaffe/kaffevm/verifier/verify.c (checkMethodCall): 
+	Use getTOBJ instead of using TOBJ directly.
+
+2005-03-13  Dalibor Topic  <robilad at kaffe.org>
+
 	* kaffe/kaffevm/kaffe-gc/gc-mem.c (KGC_BLOCKS): Added.
 	(gc_block_base) Made static.
 
Index: kaffe/kaffe/kaffevm/verifier/verify-block.c
diff -u kaffe/kaffe/kaffevm/verifier/verify-block.c:1.5 kaffe/kaffe/kaffevm/verifier/verify-block.c:1.6
--- kaffe/kaffe/kaffevm/verifier/verify-block.c:1.5	Thu Dec 23 19:45:09 2004
+++ kaffe/kaffe/kaffevm/verifier/verify-block.c	Sun Mar 13 14:34:56 2005
@@ -839,7 +839,7 @@
 			}
 			else {
 				if (arrayType->data.class == TOBJARR->data.class) {
-					*arrayType = *TOBJ;
+					*arrayType = *getTOBJ();
 				} else if (arrayType->data.class != TNULL->data.class) {
 					arrayType->tinfo = TINFO_SIG;
 					arrayType->data.sig = CLASS_CNAME(arrayType->data.class) + 1;
Index: kaffe/kaffe/kaffevm/verifier/verify-type.c
diff -u kaffe/kaffe/kaffevm/verifier/verify-type.c:1.8 kaffe/kaffe/kaffevm/verifier/verify-type.c:1.9
--- kaffe/kaffe/kaffevm/verifier/verify-type.c:1.8	Sat Jul 17 07:57:35 2004
+++ kaffe/kaffe/kaffevm/verifier/verify-type.c	Sun Mar 13 14:34:56 2005
@@ -64,7 +64,12 @@
 
 static const char* OBJECT_SIG  = "Ljava/lang/Object;";
 static Type  verify_OBJ;
-Type* TOBJ = &verify_OBJ;
+static Type* TOBJ = &verify_OBJ;
+
+Type* getTOBJ(void)
+{
+  return TOBJ;
+}
 
 static const char* OBJARR_SIG = "[Ljava/lang/Object;";
 static Type  verify_OBJARR;
Index: kaffe/kaffe/kaffevm/verifier/verify-type.h
diff -u kaffe/kaffe/kaffevm/verifier/verify-type.h:1.5 kaffe/kaffe/kaffevm/verifier/verify-type.h:1.6
--- kaffe/kaffe/kaffevm/verifier/verify-type.h:1.5	Mon Jun 28 21:14:34 2004
+++ kaffe/kaffe/kaffevm/verifier/verify-type.h	Sun Mar 13 14:34:56 2005
@@ -101,7 +101,8 @@
 extern Type* TDOUBLE;
 extern Type* TNULL;
 extern Type* TWIDE;
-extern Type* TOBJ;
+
+extern Type* getTOBJ(void);
 
 extern Type* TOBJARR;
 extern Type* TCHARARR;
Index: kaffe/kaffe/kaffevm/verifier/verify.c
diff -u kaffe/kaffe/kaffevm/verifier/verify.c:1.7 kaffe/kaffe/kaffevm/verifier/verify.c:1.8
--- kaffe/kaffe/kaffevm/verifier/verify.c:1.7	Sat Jul 17 07:57:36 2004
+++ kaffe/kaffe/kaffevm/verifier/verify.c	Sun Mar 13 14:34:56 2005
@@ -599,7 +599,7 @@
 					t_uninit_super.data.class = uninit->type.data.class->superclass;
 					
 					if (!sameType(methodRefClass, &uninit->type) &&
-					    uninit->type.data.class != TOBJ->data.class &&
+					    uninit->type.data.class != getTOBJ()->data.class &&
 					    !sameType(methodRefClass, &t_uninit_super)) {
 						return verifyErrorInCheckMethodCall(v, argbuf, pc, idx, pool, methSig, "incompatible receiving type for superclass constructor call");
 					}




More information about the kaffe mailing list