ruby-changes:61940
From: Takashi <ko1@a...>
Date: Fri, 26 Jun 2020 14:22:15 +0900 (JST)
Subject: [ruby-changes:61940] 9dbc2294a6 (master): Collect insns from a child process
https://git.ruby-lang.org/ruby.git/commit/?id=9dbc2294a6 From 9dbc2294a6c35f201d9a05d8b02f818c05d6f399 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Thu, 25 Jun 2020 22:21:12 -0700 Subject: Collect insns from a child process to make sure :opt_invokebuiltin_delegate_leave doesn't become :(trace_)opt_invokebuiltin_delegate. This is to prevent a warning like > /tmp/ruby/v3/src/trunk-test/test/ruby/test_jit.rb:618: warning: 'opt_invokebuiltin_delegate_leave' insn is not included in the script. Actual insns are: opt_invokebuiltin_delegate leave diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb index c70a6b2..339bfa2 100644 --- a/test/ruby/test_jit.rb +++ b/test/ruby/test_jit.rb @@ -614,7 +614,10 @@ class TestJIT < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_jit.rb#L614 def test_compile_insn_opt_invokebuiltin_delegate_leave skip 'ld SEGVs for this' if RUBY_PLATFORM.start_with?("s390x-") - insns = collect_insns(RubyVM::InstructionSequence.of("\x00".method(:unpack)).to_a) + iseq = eval(EnvUtil.invoke_ruby(['-e', <<~'EOS'], '', true).first) + p RubyVM::InstructionSequence.of("\x00".method(:unpack)).to_a + EOS + insns = collect_insns(iseq) mark_tested_insn(:opt_invokebuiltin_delegate_leave, used_insns: insns) assert_eval_with_jit('print "\x00".unpack("c")', stdout: '[0]', success_count: 1) end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/