Initial support for opt_case_dispatch
This commit is contained in:
parent
366c3c7644
commit
f81c7a6747
Notes:
git
2023-03-06 07:29:42 +00:00
@ -24,7 +24,7 @@ module RubyVM::MJIT
|
|||||||
asm.incr_counter(:mjit_insns_count)
|
asm.incr_counter(:mjit_insns_count)
|
||||||
asm.comment("Insn: #{insn.name}")
|
asm.comment("Insn: #{insn.name}")
|
||||||
|
|
||||||
# 62/101
|
# 63/101
|
||||||
case insn.name
|
case insn.name
|
||||||
when :nop then nop(jit, ctx, asm)
|
when :nop then nop(jit, ctx, asm)
|
||||||
when :getlocal then getlocal(jit, ctx, asm)
|
when :getlocal then getlocal(jit, ctx, asm)
|
||||||
@ -93,7 +93,7 @@ module RubyVM::MJIT
|
|||||||
when :branchunless then branchunless(jit, ctx, asm)
|
when :branchunless then branchunless(jit, ctx, asm)
|
||||||
# branchnil
|
# branchnil
|
||||||
# once
|
# 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_plus then opt_plus(jit, ctx, asm)
|
||||||
when :opt_minus then opt_minus(jit, ctx, asm)
|
when :opt_minus then opt_minus(jit, ctx, asm)
|
||||||
when :opt_mult then opt_mult(jit, ctx, asm)
|
when :opt_mult then opt_mult(jit, ctx, asm)
|
||||||
@ -1066,7 +1066,15 @@ module RubyVM::MJIT
|
|||||||
|
|
||||||
# branchnil
|
# branchnil
|
||||||
# once
|
# 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 jit [RubyVM::MJIT::JITState]
|
||||||
# @param ctx [RubyVM::MJIT::Context]
|
# @param ctx [RubyVM::MJIT::Context]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user