mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
a640bcee04
commit
9dbc2294a6
1 changed files with 4 additions and 1 deletions
|
@ -614,7 +614,10 @@ class TestJIT < Test::Unit::TestCase
|
||||||
|
|
||||||
def test_compile_insn_opt_invokebuiltin_delegate_leave
|
def test_compile_insn_opt_invokebuiltin_delegate_leave
|
||||||
skip 'ld SEGVs for this' if RUBY_PLATFORM.start_with?("s390x-")
|
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)
|
mark_tested_insn(:opt_invokebuiltin_delegate_leave, used_insns: insns)
|
||||||
assert_eval_with_jit('print "\x00".unpack("c")', stdout: '[0]', success_count: 1)
|
assert_eval_with_jit('print "\x00".unpack("c")', stdout: '[0]', success_count: 1)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue