RJIT: Simplify how Capstone is used in tests

This commit is contained in:
Takashi Kokubun 2023-03-13 20:40:24 -07:00
parent 1c8e69d602
commit d8344559b2
4 changed files with 9 additions and 19 deletions

View file

@ -58,8 +58,8 @@ module RubyVM::RJIT
(@mem_block...(@mem_block + @mem_size)).include?(addr)
end
def dump_disasm(from, to, io: STDOUT, color: true)
C.dump_disasm(from, to).each do |address, mnemonic, op_str|
def dump_disasm(from, to, io: STDOUT, color: true, test: false)
C.dump_disasm(from, to, test:).each do |address, mnemonic, op_str|
@comments.fetch(address, []).each do |comment|
io.puts colorize(" # #{comment}", bold: true, color:)
end