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

Kaffe CVS cvs-commits at kaffe.org
Mon Feb 16 11:00:04 PST 2004


PatchSet 4435 
Date: 2004/02/16 18:36:59
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Replaced macro by static inline function

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

        * kaffe/kaffevm/verify.c
        (opstackWPushBlind): New static inline function.
        (OPSTACK_WPUSH_BLIND) Removed.
        Replaced use of OPSTACK_WPUSH_BLIND by opstackWPushBlind.

Members: 
	ChangeLog:1.2018->1.2019 
	kaffe/kaffevm/verify.c:1.51->1.52 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2018 kaffe/ChangeLog:1.2019
--- kaffe/ChangeLog:1.2018	Mon Feb 16 18:28:09 2004
+++ kaffe/ChangeLog	Mon Feb 16 18:36:59 2004
@@ -1,6 +1,13 @@
 2004-02-16  Dalibor Topic <robilad at kaffe.org>
 
         * kaffe/kaffevm/verify.c
+        (opstackWPushBlind): New static inline function.
+        (OPSTACK_WPUSH_BLIND) Removed.
+        Replaced use of OPSTACK_WPUSH_BLIND by opstackWPushBlind.
+
+2004-02-16  Dalibor Topic <robilad at kaffe.org>
+
+        * kaffe/kaffevm/verify.c
         (opstackPushBlind): New static inline function.
         (OPSTACK_PUSH_BLIND) Removed.
         Replaced use of OPSTACK_PUSH_BLIND by opstackPushBlind.
Index: kaffe/kaffe/kaffevm/verify.c
diff -u kaffe/kaffe/kaffevm/verify.c:1.51 kaffe/kaffe/kaffevm/verify.c:1.52
--- kaffe/kaffe/kaffevm/verify.c:1.51	Mon Feb 16 18:28:11 2004
+++ kaffe/kaffe/kaffevm/verify.c	Mon Feb 16 18:37:01 2004
@@ -2626,6 +2626,19 @@
 }
 
 /*
+ * Helper function for opstack access in verifyBasicBlock.
+ * only use for LONGs and DOUBLEs.
+ */
+static inline
+void
+opstackWPushBlind(BlockInfo* block,
+		  const Type* type)
+{
+	opstackPushBlind(block, type);
+	opstackPushBlind(block, TWIDE);
+}
+
+/*
  * verifyBasicBlock()
  *   Simulates execution of a basic block by modifying its simulated operand stack and local variable array.
  */
@@ -2707,16 +2720,10 @@
 #define OPSTACK_PUSH(_TINFO) \
 	CHECK_STACK_OVERFLOW(1); \
 	opstackPushBlind(block, _TINFO)
-	
-	
-	/* only use for LONGs and DOUBLEs */
-#define OPSTACK_WPUSH_BLIND(_TINFO) \
-	opstackPushBlind(block, _TINFO); \
-	opstackPushBlind(block, TWIDE)
-	
+
 #define OPSTACK_WPUSH(_T) \
 	CHECK_STACK_OVERFLOW(2); \
-        OPSTACK_WPUSH_BLIND(_T)
+        opstackWPushBlind(block, _T)
 	
 	
 	
@@ -3328,12 +3335,12 @@
 		case I2L:
 			OPSTACK_POP_T(TINT);
 			CHECK_STACK_OVERFLOW(2);
-			OPSTACK_WPUSH_BLIND(TLONG);
+			opstackWPushBlind(block, TLONG);
 			break;
 		case I2D:
 			OPSTACK_POP_T(TINT);
 			CHECK_STACK_OVERFLOW(2);
-			OPSTACK_WPUSH_BLIND(TDOUBLE);
+			opstackWPushBlind(block, TDOUBLE);
 			break;
 			
 		case F2I:
@@ -3359,7 +3366,7 @@
 			break;
 		case L2D:
 			OPSTACK_WPOP_T(TLONG);
-			OPSTACK_WPUSH_BLIND(TDOUBLE);
+			opstackWPushBlind(block, TDOUBLE);
 			break;
 			
 		case D2I:
@@ -3372,7 +3379,7 @@
 			break;
 		case D2L:
 			OPSTACK_WPOP_T(TDOUBLE);
-			OPSTACK_WPUSH_BLIND(TLONG);
+			opstackWPushBlind(block, TLONG);
 			break;
 			
 			




More information about the kaffe mailing list