ruby-changes:32196
From: ko1 <ko1@a...>
Date: Wed, 18 Dec 2013 14:33:58 +0900 (JST)
Subject: [ruby-changes:32196] ko1:r44275 (trunk): * vm_exec.h (VM_DEBUG_STACKOVERFLOW): added.
ko1 2013-12-18 14:33:50 +0900 (Wed, 18 Dec 2013) New Revision: 44275 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44275 Log: * vm_exec.h (VM_DEBUG_STACKOVERFLOW): added. disable stack overflow check for every stack pushing as default. * vm_exec.c (vm_stack_overflow_for_insn): ditto. Modified files: trunk/ChangeLog trunk/vm_exec.c trunk/vm_exec.h Index: ChangeLog =================================================================== --- ChangeLog (revision 44274) +++ ChangeLog (revision 44275) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Dec 18 14:32:06 2013 Koichi Sasada <ko1@a...> + + * vm_exec.h (VM_DEBUG_STACKOVERFLOW): added. + disable stack overflow check for every stack pushing as default. + + * vm_exec.c (vm_stack_overflow_for_insn): ditto. + Wed Dec 18 10:00:22 2013 Eric Hodel <drbrain@s...> * lib/rubygems: Update to RubyGems master d8f12e2. This increases the Index: vm_exec.c =================================================================== --- vm_exec.c (revision 44274) +++ vm_exec.c (revision 44275) @@ -29,6 +29,7 @@ static void vm_analysis_insn(int insn); https://github.com/ruby/ruby/blob/trunk/vm_exec.c#L29 #endif /* #define DECL_SC_REG(r, reg) VALUE reg_##r */ +#if VM_DEBUG_STACKOVERFLOW NORETURN(static void vm_stack_overflow_for_insn(void)); static void vm_stack_overflow_for_insn(void) @@ -37,6 +38,7 @@ vm_stack_overflow_for_insn(void) https://github.com/ruby/ruby/blob/trunk/vm_exec.c#L38 "Please contact ruby-core/dev with your (a part of) script. " "This check will be removed soon."); } +#endif #if !OPT_CALL_THREADED_CODE static VALUE Index: vm_exec.h =================================================================== --- vm_exec.h (revision 44274) +++ vm_exec.h (revision 44275) @@ -169,7 +169,14 @@ default: \ https://github.com/ruby/ruby/blob/trunk/vm_exec.h#L169 #endif #define SCREG(r) (reg_##r) + +#define VM_DEBUG_STACKOVERFLOW 0 + +#if VM_DEBUG_STACKOVERFLOW #define CHECK_VM_STACK_OVERFLOW_FOR_INSN(cfp, margin) \ WHEN_VM_STACK_OVERFLOWED(cfp, (cfp)->sp, margin) vm_stack_overflow_for_insn() +#else +#define CHECK_VM_STACK_OVERFLOW_FOR_INSN(cfp, margin) +#endif #endif /* RUBY_VM_EXEC_H */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/