[kaffe] CVS kaffe (dalibor): Replaced part of macro by static inline function
Kaffe CVS
Kaffe Mailing List <kaffe@kaffe.org>
Mon Feb 16 09:54:01 2004
PatchSet 4432
Date: 2004/02/16 17:46:57
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
(checkStackOverflowErrorInVerifyBasicBlock): New static inline function.
(CHECK_STACK_OVERFLOW) Use checkStackOverflowErrorInVerifyBasicBlock.
Members:
ChangeLog:1.2015->1.2016
kaffe/kaffevm/verify.c:1.48->1.49
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2015 kaffe/ChangeLog:1.2016
--- kaffe/ChangeLog:1.2015 Mon Feb 16 15:37:34 2004
+++ kaffe/ChangeLog Mon Feb 16 17:46:57 2004
@@ -1,6 +1,12 @@
2004-02-16 Dalibor Topic <robilad@kaffe.org>
* kaffe/kaffevm/verify.c
+ (checkStackOverflowErrorInVerifyBasicBlock): New static inline function.
+ (CHECK_STACK_OVERFLOW) Use checkStackOverflowErrorInVerifyBasicBlock.
+
+2004-02-16 Dalibor Topic <robilad@kaffe.org>
+
+ * kaffe/kaffevm/verify.c
(getOpstackWTop): New static inline function.
(OPSTACK_WTOP) Removed.
Replaced use of OPSTACK_WTOP by getOpstackWTop.
Index: kaffe/kaffe/kaffevm/verify.c
diff -u kaffe/kaffe/kaffevm/verify.c:1.48 kaffe/kaffe/kaffevm/verify.c:1.49
--- kaffe/kaffe/kaffevm/verify.c:1.48 Mon Feb 16 15:37:35 2004
+++ kaffe/kaffe/kaffevm/verify.c Mon Feb 16 17:46:59 2004
@@ -2554,6 +2554,30 @@
}
/*
+ * Helper function for error reporting in CHECK_STACK_OVERFLOW macro in verifyBasicBlock.
+ */
+static inline
+bool
+checkStackOverflowErrorInVerifyBasicBlock(errorInfo* einfo,
+ const Method* method,
+ BlockInfo* block,
+ Hjava_lang_Class* this,
+ unsigned int n)
+{
+ DBG(VERIFY3,
+ dprintf(" block->stacksz: %d :: N = %d :: method->stacksz = %d\n",
+ block->stacksz,
+ n,
+ method->stacksz);
+ );
+ DBG(VERIFY3,
+ dprintf(" here's the stack: \n");
+ printBlock(method, block, " ");
+ );
+ return verifyErrorInVerifyBasicBlock(einfo, method, this, "stack overflow");
+}
+
+/*
* Helper function for opstack access in verifyBasicBlock.
*
* @return nth item on the operand stack from the top.
@@ -2666,10 +2690,7 @@
#define CHECK_STACK_OVERFLOW(_N) \
if (block->stacksz + _N > method->stacksz) { \
- DBG(VERIFY3, dprintf(" block->stacksz: %d :: N = %d :: method->stacksz = %d\n", \
- block->stacksz, _N, method->stacksz); ); \
- DBG(VERIFY3, dprintf(" here's the stack: \n"); printBlock(method, block, " "); ); \
- return verifyErrorInVerifyBasicBlock(einfo, method, this, "stack overflow"); \
+ return checkStackOverflowErrorInVerifyBasicBlock(einfo, method, block, this, _N); \
}
#define OPSTACK_INFO(_N) \