summaryrefslogtreecommitdiffstats
path: root/vm.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-30 18:27:20 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-30 18:27:20 +0000
commit9e933b09c11b1d7eed85b041deab85a6c55d23d6 (patch)
tree5224935ad3a778010404a32b47dbca7912a9f30e /vm.h
parent9c202e9b481cfc29e2a2dd15a8ad74bfaa5d6e4c (diff)
downloadruby-9e933b09c11b1d7eed85b041deab85a6c55d23d6.tar.gz
ruby-9e933b09c11b1d7eed85b041deab85a6c55d23d6.tar.xz
ruby-9e933b09c11b1d7eed85b041deab85a6c55d23d6.zip
* insnhelper.h, vm.h: some refactoring.
remove useless comments, etc. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.h')
-rw-r--r--vm.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/vm.h b/vm.h
index b1c543eb9..855efeae0 100644
--- a/vm.h
+++ b/vm.h
@@ -220,6 +220,12 @@ default: \
((rb_control_frame_t *)(th->stack + th->stack_size) - (rb_control_frame_t *)(cfp))
#define VM_SP_CNT(th, sp) ((sp) - (th)->stack)
+#define CHECK_STACK_OVERFLOW(cfp, margin) do \
+ if (((VALUE *)(cfp)->sp) + (margin) >= ((VALUE *)cfp)) { \
+ rb_exc_raise(sysstack_error); \
+ } \
+while (0)
+
/*
env{
env[0] // special (block or prev env)