Initial support for opt_case_dispatch

This commit is contained in:
Takashi Kokubun 2023-03-03 21:10:17 -08:00
Родитель 366c3c7644
Коммит f81c7a6747
1 изменённых файлов: 11 добавлений и 3 удалений

Просмотреть файл

@ -24,7 +24,7 @@ module RubyVM::MJIT
asm.incr_counter(:mjit_insns_count)
asm.comment("Insn: #{insn.name}")
# 62/101
# 63/101
case insn.name
when :nop then nop(jit, ctx, asm)
when :getlocal then getlocal(jit, ctx, asm)
@ -93,7 +93,7 @@ module RubyVM::MJIT
when :branchunless then branchunless(jit, ctx, asm)
# branchnil
# once
# opt_case_dispatch
when :opt_case_dispatch then opt_case_dispatch(jit, ctx, asm)
when :opt_plus then opt_plus(jit, ctx, asm)
when :opt_minus then opt_minus(jit, ctx, asm)
when :opt_mult then opt_mult(jit, ctx, asm)
@ -1066,7 +1066,15 @@ module RubyVM::MJIT
# branchnil
# once
# opt_case_dispatch
# @param jit [RubyVM::MJIT::JITState]
# @param ctx [RubyVM::MJIT::Context]
# @param asm [RubyVM::MJIT::Assembler]
def opt_case_dispatch(jit, ctx, asm)
# Just go to === branches for now
ctx.stack_pop
KeepCompiling
end
# @param jit [RubyVM::MJIT::JITState]
# @param ctx [RubyVM::MJIT::Context]