r39197に対するパッチ。
diff —git a/vm.c b/vm.c index 36def2c..b646ea7 100644@ -262,7 +262,7 @ ruby_vm_run_at_exit_hooks(rb_vm_t *vm)
*/
#define ENV_IN_HEAP_P(th, env) \| require 'pattern-match' | |
| class Module | |
| def check(pattern, mid) | |
| prepend Module.new { | |
| define_method(mid) do |*args| | |
| ret = super(*args) | |
| match(ret) do | |
| with(Kernel.eval(pattern, Kernel.binding)) { ret } | |
| end |
| diff --git a/array.c b/array.c | |
| index 9a93d7f..b673c63 100644 | |
| --- a/array.c | |
| +++ b/array.c | |
| @@ -4429,7 +4429,7 @@ static VALUE sym_random; | |
| static VALUE | |
| rb_ary_shuffle_bang(int argc, VALUE *argv, VALUE ary) | |
| { | |
| - VALUE opts, randgen = rb_cRandom; | |
| + VALUE rnd, randgen = rb_cRandom; |
| $ make TESTS='--gc-stress objspace/test_objspace.rb pathname/test_pathname.rb' test-all | |
| TestPathname#test_each_entry/home/kazuki/work/ruby/lib/pp.rb:165: [BUG] Segmentation fault | |
| ruby 2.1.0dev (2013-04-25 trunk 40462) [x86_64-linux] | |
| -- Control frame information ----------------------------------------------- | |
| c:0061 p:0008 s:0261 e:000259 METHOD /home/kazuki/work/ruby/lib/pp.rb:165 | |
| c:0060 p:0011 s:0255 e:000254 BLOCK /home/kazuki/work/ruby/lib/pp.rb:356 | |
| c:0059 p:0029 s:0252 e:000251 BLOCK /home/kazuki/work/ruby/lib/pp.rb:247 [FINISH] | |
| c:0058 p:---- s:0249 e:000248 CFUNC :each |
| require 'pattern-match' | |
| def replace_repeated(val, &block) | |
| ret = match(val, &block) | |
| if ret == val | |
| ret | |
| else | |
| replace_repeated(ret, &block) | |
| end | |
| rescue PatternMatch::NoMatchingPatternError |
| diff --git a/vm.c b/vm.c | |
| index 36def2c..89314c7 100644 | |
| --- a/vm.c | |
| +++ b/vm.c | |
| @@ -1782,7 +1782,14 @@ rb_thread_mark(void *ptr) | |
| if (iseq) { | |
| rb_gc_mark(RUBY_VM_NORMAL_ISEQ_P(iseq) ? iseq->self : (VALUE)iseq); | |
| } | |
| - if (cfp->me) ((rb_method_entry_t *)cfp->me)->mark = 1; | |
| + if (cfp->me) { |
r39197に対するパッチ。
diff —git a/vm.c b/vm.c index 36def2c..b646ea7 100644@ -262,7 +262,7 @ ruby_vm_run_at_exit_hooks(rb_vm_t *vm)
*/
#define ENV_IN_HEAP_P(th, env) \| diff --git a/hook.cpp b/hook.cpp | |
| index 98b585d..b9a994f 100644 | |
| --- a/hook.cpp | |
| +++ b/hook.cpp | |
| @@ -810,6 +810,9 @@ static LRESULT CALLBACK lowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lP | |
| if (g.m_keyboardDetour && g.m_engine) { | |
| unsigned int result; | |
| + if (nCode == HC_ACTION && pKbll->vkCode == VK_TAB && pKbll->flags & LLKHF_ALTDOWN) { | |
| + goto through; |
| diff --git a/tool/ruby_vm/views/_insn_entry.erb b/tool/ruby_vm/views/_insn_entry.erb | |
| index bae8eae890..08d16882ec 100644 | |
| --- a/tool/ruby_vm/views/_insn_entry.erb | |
| +++ b/tool/ruby_vm/views/_insn_entry.erb | |
| @@ -18,6 +18,11 @@ INSN_ENTRY(<%= insn.name %>) | |
| % end | |
| START_OF_ORIGINAL_INSN(<%= insn.name %>); | |
| +if (rb_iseq_eval_main_p && getenv("ENABLE_TRAP")) { | |
| + rb_vmdebug_stack_dump_raw_current(); |
ruby 1.9.3-p0(–prefix=/usr/local/ruby-1.9.3)
gnuplot
cd /tmp git clone git://github.com/ruby/ruby.git cd ruby cp -a benchmark /tmp sh path/to/bm-run.sh