ruby-changes:73455
From: Takashi <ko1@a...>
Date: Wed, 7 Sep 2022 05:56:54 +0900 (JST)
Subject: [ruby-changes:73455] 87ef90909b (master): Drop an unused method for debugging
https://git.ruby-lang.org/ruby.git/commit/?id=87ef90909b From 87ef90909b7656aaf8bb968376b879f9aa207a0b Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Wed, 7 Sep 2022 05:54:37 +0900 Subject: Drop an unused method for debugging and add another useful one instead. --- mjit_compiler.rb | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/mjit_compiler.rb b/mjit_compiler.rb index 6785e2ffab..77dcf7ef51 100644 --- a/mjit_compiler.rb +++ b/mjit_compiler.rb @@ -104,13 +104,10 @@ if RubyVM::MJIT.enabled? https://github.com/ruby/ruby/blob/trunk/mjit_compiler.rb#L104 Primitive.cexpr! '(VALUE)NUM2PTR(value)' end - def debug(status) - _cc_entries_addr = status.compiled_iseq.jit_unit.cc_entries.instance_variable_get(:@addr) - Primitive.cstmt! %{ - const struct rb_callcache **cc_entries = (const struct rb_callcache **)NUM2PTR(_cc_entries_addr); - fprintf(stderr, "debug: %p\n", cc_entries[0]); - return Qnil; - } + # Convert RubyVM::InstructionSequence to C.rb_iseq_t. Not used by the compiler, but useful for debugging. + def rb_iseqw_to_iseq(iseqw) + iseq_addr = Primitive.cexpr! 'PTR2NUM((VALUE)rb_iseqw_to_iseq(iseqw))' + rb_iseq_t.new(iseq_addr) end # TODO: remove this after migration -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/