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

Kaffe CVS Kaffe Mailing List <kaffe@kaffe.org>
Mon Feb 16 12:42:02 2004


PatchSet 4436 
Date: 2004/02/16 20:33:45
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Replaced part of macro by static inline function


2004-02-16  Dalibor Topic <robilad@kaffe.org>

        * kaffe/kaffevm/verify.c
        (opstackPeekTBlindErrorInVerifyBasicBlock): New static inline function.
        (OPSTACK_PEEK_T_BLIND) Use opstackPeekTBlindErrorInVerifyBasicBlock.

Members: 
	ChangeLog:1.2019->1.2020 
	kaffe/kaffevm/verify.c:1.52->1.53 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2019 kaffe/ChangeLog:1.2020
--- kaffe/ChangeLog:1.2019	Mon Feb 16 18:36:59 2004
+++ kaffe/ChangeLog	Mon Feb 16 20:33:45 2004
@@ -1,6 +1,12 @@
 2004-02-16  Dalibor Topic <robilad@kaffe.org>
 
         * kaffe/kaffevm/verify.c
+        (opstackPeekTBlindErrorInVerifyBasicBlock): New static inline function.
+        (OPSTACK_PEEK_T_BLIND) Use opstackPeekTBlindErrorInVerifyBasicBlock.
+
+2004-02-16  Dalibor Topic <robilad@kaffe.org>
+
+        * kaffe/kaffevm/verify.c
         (opstackWPushBlind): New static inline function.
         (OPSTACK_WPUSH_BLIND) Removed.
         Replaced use of OPSTACK_WPUSH_BLIND by opstackWPushBlind.
Index: kaffe/kaffe/kaffevm/verify.c
diff -u kaffe/kaffe/kaffevm/verify.c:1.52 kaffe/kaffe/kaffevm/verify.c:1.53
--- kaffe/kaffe/kaffevm/verify.c:1.52	Mon Feb 16 18:37:01 2004
+++ kaffe/kaffe/kaffevm/verify.c	Mon Feb 16 20:33:46 2004
@@ -2639,6 +2639,27 @@
 }
 
 /*
+ * Helper function for error reporting in OPSTACK_PEEK_T_BLIND macro in verifyBasicBlock.
+ */
+static inline
+bool
+opstackPeekTBlindErrorInVerifyBasicBlock(errorInfo* einfo,
+					 const Method* method,
+					 BlockInfo* block,
+					 Hjava_lang_Class* this,
+					 const Type* type)
+{
+	DBG(VERIFY3,
+	    dprintf("                OPSTACK_TOP: ");
+	    printType(getOpstackTop(block));
+	    dprintf(" vs. what's we wanted: ");
+	    printType(type);
+	    dprintf("\n");
+	    );
+	return verifyErrorInVerifyBasicBlock(einfo, method, this, "top of opstack does not have desired type");
+}
+
+/*
  * verifyBasicBlock()
  *   Simulates execution of a basic block by modifying its simulated operand stack and local variable array.
  */
@@ -2730,12 +2751,7 @@
 	/* ensure that the top item on the stack is of type _T	*/
 #define OPSTACK_PEEK_T_BLIND(_TINFO) \
 	if (!typecheck(einfo, this, _TINFO, getOpstackTop(block))) { \
-		DBG(VERIFY3, \
-		    dprintf("                OPSTACK_TOP: "); \
-		    printType(getOpstackTop(block)); \
-		    dprintf(" vs. what's we wanted: "); \
-		    printType(_TINFO); dprintf("\n"); ); \
-		return verifyErrorInVerifyBasicBlock(einfo, method, this, "top of opstack does not have desired type"); \
+		return opstackPeekTBlindErrorInVerifyBasicBlock(einfo, method, block, this, _TINFO); \
 	}
 	
 #define OPSTACK_PEEK_T(_TINFO) \