[kaffe] CVS kaffe (dalibor): Replaced part of macro by static inline function

Kaffe CVS cvs-commits at kaffe.org
Sun Feb 15 11:23:02 PST 2004


PatchSet 4427 
Date: 2004/02/15 19:19:58
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Replaced part of macro by static inline function

2004-02-15  Dalibor Topic <robilad at kaffe.org>

        * kaffe/kaffevm/verify.c
        (ensureOpstackSizeErrorInVerifyBasicBlock): New static inline function.
        (ENSURE_OPSTACK_SIZE) Use ensureOpstackSizeErrorInVerifyBasicBlock.

Members: 
	ChangeLog:1.2010->1.2011 
	kaffe/kaffevm/verify.c:1.43->1.44 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2010 kaffe/ChangeLog:1.2011
--- kaffe/ChangeLog:1.2010	Sun Feb 15 18:23:21 2004
+++ kaffe/ChangeLog	Sun Feb 15 19:19:58 2004
@@ -1,6 +1,12 @@
 2004-02-15  Dalibor Topic <robilad at kaffe.org>
 
         * kaffe/kaffevm/verify.c
+        (ensureOpstackSizeErrorInVerifyBasicBlock): New static inline function.
+        (ENSURE_OPSTACK_SIZE) Use ensureOpstackSizeErrorInVerifyBasicBlock.
+
+2004-02-15  Dalibor Topic <robilad at kaffe.org>
+
+        * kaffe/kaffevm/verify.c
         (ensureLocalTypeErrorInVerifyBasicBlock): New static inline function.
         (ENSURE_LOCAL_TYPE) Use ensureLocalTypeErrorInVerifyBasicBlock.
 	Removed unnecessary undef for VERIFY_ERROR.
Index: kaffe/kaffe/kaffevm/verify.c
diff -u kaffe/kaffe/kaffevm/verify.c:1.43 kaffe/kaffe/kaffevm/verify.c:1.44
--- kaffe/kaffe/kaffevm/verify.c:1.43	Sun Feb 15 18:23:23 2004
+++ kaffe/kaffe/kaffevm/verify.c	Sun Feb 15 19:19:59 2004
@@ -2509,6 +2509,23 @@
 }
 
 /*
+ * Helper function for error reporting in ENSURE_OPSTACK_SIZE macro in verifyBasicBlock.
+ */
+static inline
+bool
+ensureOpstackSizeErrorInVerifyBasicBlock(errorInfo* einfo,
+					 const Method* method,
+					 BlockInfo* block,
+					 Hjava_lang_Class* this)
+{
+	DBG(VERIFY3,
+	    dprintf("                here's the stack: \n");
+	    printBlock(method, block, "                    ");
+	    );
+	return verifyErrorInVerifyBasicBlock(einfo, method, this, "not enough items on stack for operation");
+}
+
+/*
  * verifyBasicBlock()
  *   Simulates execution of a basic block by modifying its simulated operand stack and local variable array.
  */
@@ -2579,8 +2596,7 @@
 	
 #define ENSURE_OPSTACK_SIZE(_N) \
 	if (block->stacksz < (_N)) { \
-                DBG(VERIFY3, dprintf("                here's the stack: \n"); printBlock(method, block, "                    "); ); \
-		return verifyErrorInVerifyBasicBlock(einfo, method, this, "not enough items on stack for operation"); \
+		return ensureOpstackSizeErrorInVerifyBasicBlock(einfo, method, block, this); \
 	}
 
 #define CHECK_STACK_OVERFLOW(_N) \




More information about the kaffe mailing list