diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-18 02:29:58 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-18 02:29:58 +0000 |
commit | 52e35469f0a057ce31c04a36116e7a5563c2665b (patch) | |
tree | 57533092543b0adf68b2c505850f58715a9ba832 /vm_exec.h | |
parent | aa358ac11cc7224eb2bf2c02e85a0956543726f2 (diff) | |
download | ruby-52e35469f0a057ce31c04a36116e7a5563c2665b.tar.gz |
vm_core.h: extract VM_STACK_OVERFLOWED_P
* vm_core.h (VM_STACK_OVERFLOWED_P, WHEN_VM_STACK_OVERFLOWED): extract
condition from CHECK_VM_STACK_OVERFLOW.
* vm_exec.c (vm_stack_overflow_for_insn): move rb_bug call.
* vm_exec.h (CHECK_VM_STACK_OVERFLOW_FOR_INSN): share the condition
with CHECK_VM_STACK_OVERFLOW.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_exec.h')
-rw-r--r-- | vm_exec.h | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -169,12 +169,7 @@ default: \ #endif #define SCREG(r) (reg_##r) -#define CHECK_VM_STACK_OVERFLOW_FOR_INSN(cfp, margin) do { \ - if (((rb_control_frame_t *)(((cfp)->sp) + (margin)) + 1) >= (cfp)) { \ - rb_bug("CHECK_VM_STACK_OVERFLOW_FOR_INSN: should not overflow here. " \ - "Please contact ruby-core/dev with your (a part of) script. " \ - "This check will be removed soon."); \ - } \ -} while (0) +#define CHECK_VM_STACK_OVERFLOW_FOR_INSN(cfp, margin) \ + WHEN_VM_STACK_OVERFLOWED(cfp, (cfp)->sp, margin) vm_stack_overflow_for_insn() #endif /* RUBY_VM_EXEC_H */ |