[kaffe] CVS kaffe (robilad): small compiler warning fix

Kaffe CVS cvs-commits at kaffe.org
Fri Apr 21 17:43:18 PDT 2006


PatchSet 7256 
Date: 2006/04/22 00:32:11
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
small compiler warning fix

2006-04-22  Dalibor Topic  <robilad at kaffe.org>

        * kaffe/kaffevm/jit/native-wrapper.c (Kaffe_wrapper):
        Call the right initInsnSequence depending on the jit engine.
        Call INIT_JIT_MD if necessary.

        * kaffe/kaffevm/jit3/machine.c (initInsnSequence) Removed
        unused parameters from prototype.
        (translate): Call INIT_JIT_MD if necessary.

        * kaffe/kaffevm/jit3/machine.h: (initInsnSequence) Removed
        unused parameters from prototype.

Members: 
	ChangeLog:1.4761->1.4762 
	kaffe/kaffevm/jit/native-wrapper.c:1.14->1.15 
	kaffe/kaffevm/jit3/machine.c:1.81->1.82 
	kaffe/kaffevm/jit3/machine.h:1.30->1.31 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4761 kaffe/ChangeLog:1.4762
--- kaffe/ChangeLog:1.4761	Fri Apr 21 20:34:35 2006
+++ kaffe/ChangeLog	Sat Apr 22 00:32:11 2006
@@ -1,3 +1,16 @@
+2006-04-22  Dalibor Topic  <robilad at kaffe.org>
+
+	* kaffe/kaffevm/jit/native-wrapper.c (Kaffe_wrapper):
+	Call the right initInsnSequence depending on the jit engine.
+	Call INIT_JIT_MD if necessary.
+
+	* kaffe/kaffevm/jit3/machine.c (initInsnSequence) Removed 
+	unused parameters from prototype. 
+	(translate): Call INIT_JIT_MD if necessary.
+
+	* kaffe/kaffevm/jit3/machine.h: (initInsnSequence) Removed
+        unused parameters from prototype.
+
 2006-04-21  Dalibor Topic  <robilad at kaffe.org>
 
 	* config/i386/jit3-i386.def: Added debug output
Index: kaffe/kaffe/kaffevm/jit/native-wrapper.c
diff -u kaffe/kaffe/kaffevm/jit/native-wrapper.c:1.14 kaffe/kaffe/kaffevm/jit/native-wrapper.c:1.15
--- kaffe/kaffe/kaffevm/jit/native-wrapper.c:1.14	Thu Mar 30 17:39:17 2006
+++ kaffe/kaffe/kaffevm/jit/native-wrapper.c	Sat Apr 22 00:32:20 2006
@@ -125,7 +125,18 @@
 #if defined(HAVE_FAKE_CALLS)
 	initFakeCalls();
 #endif
+
+	/* Do any machine dependent JIT initialization */
+#if defined(INIT_JIT_MD)
+	INIT_JIT_MD(xmeth);
+#endif
+
+#if defined(JIT3)
+	success = initInsnSequence(maxLocal, maxStack, &info);
+#else
 	success = initInsnSequence(xmeth, 0, maxLocal, maxStack, &info);
+#endif /* defined(JIT3) */
+
 	if (!success) {
 		goto done;
 	}
Index: kaffe/kaffe/kaffevm/jit3/machine.c
diff -u kaffe/kaffe/kaffevm/jit3/machine.c:1.81 kaffe/kaffe/kaffevm/jit3/machine.c:1.82
--- kaffe/kaffe/kaffevm/jit3/machine.c:1.81	Sat Jan 14 09:11:36 2006
+++ kaffe/kaffe/kaffevm/jit3/machine.c	Sat Apr 22 00:32:21 2006
@@ -154,6 +154,36 @@
 }
 
 /*
+ * Init instruction generation.
+ */
+jboolean
+initInsnSequence(int localsz, int stacksz, errorInfo* einfo)
+{
+	/* Clear various counters */
+	tmpslot = 0;
+	maxTemp = 0;
+	maxPush = 0;
+	stackno = localsz + stacksz;
+	npc = 0;
+
+	initSeq();
+	initRegisters();
+	initSlots(stackno);
+
+	/* Before generating code, try to guess how much space we'll need. */
+	codeblock_size = ALLOCCODEBLOCKSZ;
+	codeblock = gc_malloc(codeblock_size + CODEBLOCKREDZONE,
+			      KGC_ALLOC_JIT_CODEBLOCK);
+	if (codeblock == 0) {
+		postOutOfMemory(einfo);
+		return (false);
+	}
+	CODEPC = 0;
+	
+	return (true);
+}
+
+/*
  * Translate a method into native code.
  *
  * Registers are allocated per basic block, using an LRU algorithm.
@@ -312,7 +342,12 @@
 	 * Initialise the translator.
 	 */
 	initFakeCalls();
-	success = initInsnSequence(xmeth, codeperbytecode * METHOD_BYTECODE_LEN(xmeth), xmeth->localsz, xmeth->stacksz, einfo);
+
+	/* Do any machine dependent JIT initialization */
+#if defined(INIT_JIT_MD)
+	INIT_JIT_MD(xmeth);
+#endif
+	success = initInsnSequence(xmeth->localsz, xmeth->stacksz, einfo);
 	if (success == false) {
 		goto done;
 	}
@@ -799,41 +834,6 @@
 #if defined(LABEL_Lframe)
 	LABEL_Lframe(&meth->framesize, /* unused */ 0, /* unused */ 0);
 #endif
-}
-
-/*
- * Init instruction generation.
- */
-jboolean
-initInsnSequence(Method* meth, int codesize UNUSED, int localsz, int stacksz, errorInfo* einfo)
-{
-	/* Clear various counters */
-	tmpslot = 0;
-	maxTemp = 0;
-	maxPush = 0;
-	stackno = localsz + stacksz;
-	npc = 0;
-
-	/* Do any machine dependent JIT initialization */
-#if defined(INIT_JIT_MD)
-	INIT_JIT_MD(meth);
-#endif
-
-	initSeq();
-	initRegisters();
-	initSlots(stackno);
-
-	/* Before generating code, try to guess how much space we'll need. */
-	codeblock_size = ALLOCCODEBLOCKSZ;
-	codeblock = gc_malloc(codeblock_size + CODEBLOCKREDZONE,
-			      KGC_ALLOC_JIT_CODEBLOCK);
-	if (codeblock == 0) {
-		postOutOfMemory(einfo);
-		return (false);
-	}
-	CODEPC = 0;
-	
-	return (true);
 }
 
 /*
Index: kaffe/kaffe/kaffevm/jit3/machine.h
diff -u kaffe/kaffe/kaffevm/jit3/machine.h:1.30 kaffe/kaffe/kaffevm/jit3/machine.h:1.31
--- kaffe/kaffe/kaffevm/jit3/machine.h:1.30	Thu Apr  6 01:39:11 2006
+++ kaffe/kaffe/kaffevm/jit3/machine.h	Sat Apr 22 00:32:21 2006
@@ -196,7 +196,7 @@
 struct _label_;
 struct _sequence;
 struct _errorInfo;
-extern jboolean initInsnSequence(Method *meth, int codesize, int localsz, int stacksz, struct _errorInfo *einfo);
+extern jboolean initInsnSequence(int localsz, int stacksz, struct _errorInfo *einfo);
 extern jboolean finishInsnSequence(void*, nativeCodeInfo*, struct _errorInfo*);
 extern void     installMethodCode(void*, Method*, nativeCodeInfo*);
 #define HAVE_FAKE_CALLS 1




More information about the kaffe mailing list