summaryrefslogtreecommitdiff
path: root/insnhelper.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-24 08:40:45 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-24 08:40:45 +0000
commitadc677eb5cd3aed1986c3316d5b98ed942f544d5 (patch)
tree8c50f9cef922a9fce4f7cc68adce20599b1df35d /insnhelper.h
parentd1bd418715091794dc207198a0fe4152b5f40cb1 (diff)
* insnhelper.h: change CHECK_STACK_OVERFLOW() to throw exception.
* vm.c (caller_setup_arg), vm_macro.def: remove macro_eval_setup_send_arguments and add caller_setup_arg(). * insns.def: ditto. * bootstraptest/test_method.rb: add splat arg tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insnhelper.h')
-rw-r--r--insnhelper.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/insnhelper.h b/insnhelper.h
index eb6b3ef21b..2eb071df5f 100644
--- a/insnhelper.h
+++ b/insnhelper.h
@@ -127,8 +127,11 @@
#define GET_BLOCK_PTR() \
((rb_block_t *)(GC_GUARDED_PTR_REF(GET_LFP()[0])))
-#define CHECK_STACK_OVERFLOW(th, cfp, margin) \
- (((VALUE *)(cfp)->sp) + (margin) >= ((VALUE *)cfp))
+#define CHECK_STACK_OVERFLOW(cfp, margin) do \
+ if (((VALUE *)(cfp)->sp) + (margin) >= ((VALUE *)cfp)) { \
+ rb_exc_raise(sysstack_error); \
+ } \
+while (0)
/**********************************************************/
/* deal with control flow 3: exception */