* src/vm/jit/stack.c (analyse_stack): Added label throw_stack_underflow
for the REQUIRE macro.
Christian Thalinger
Christian Ullrich
Christian Thalinger
Christian Ullrich
- $Id: stack.c 4606 2006-03-15 04:43:25Z edwin $
+ $Id: stack.c 4674 2006-03-22 17:14:07Z edwin $
/* just return methodinfo* to signal everything was ok */
return m;
/* just return methodinfo* to signal everything was ok */
return m;
+
+throw_stack_underflow:
+ *exceptionptr =
+ new_verifyerror(m, "Unable to pop operand off an empty stack");
+ return NULL;
Changes: Christian Ullrich
Changes: Christian Ullrich
- $Id: stack.h 4603 2006-03-15 00:06:03Z edwin $
+ $Id: stack.h 4674 2006-03-22 17:14:07Z edwin $
#define REQUIRE(num) \
do { \
#define REQUIRE(num) \
do { \
- if (stackdepth < (num)) { \
- *exceptionptr = \
- new_verifyerror(m, "Unable to pop operand off an empty stack"); \
- return NULL; \
- } \
- } while(0)
-
+ if (stackdepth < (num)) \
+ goto throw_stack_underflow; \
+ } while (0)
+
#define REQUIRE_1 REQUIRE(1)
#define REQUIRE_2 REQUIRE(2)
#define REQUIRE_3 REQUIRE(3)
#define REQUIRE_1 REQUIRE(1)
#define REQUIRE_2 REQUIRE(2)
#define REQUIRE_3 REQUIRE(3)