From 0a400f38e8005c280a84bab38b64eeeec99a6316 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Tue, 7 Feb 2023 23:40:05 -0800 Subject: [PATCH] Implement nop --- lib/ruby_vm/mjit/insn_compiler.rb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/ruby_vm/mjit/insn_compiler.rb b/lib/ruby_vm/mjit/insn_compiler.rb index cfbd1cd65d..7a03726d07 100644 --- a/lib/ruby_vm/mjit/insn_compiler.rb +++ b/lib/ruby_vm/mjit/insn_compiler.rb @@ -17,9 +17,9 @@ module RubyVM::MJIT asm.incr_counter(:mjit_insns_count) asm.comment("Insn: #{insn.name}") - # 13/101 + # 14/101 case insn.name - # nop + when :nop then nop(jit, ctx, asm) # getlocal # setlocal # getblockparam @@ -129,7 +129,14 @@ module RubyVM::MJIT # Insns # - # nop + # @param jit [RubyVM::MJIT::JITState] + # @param ctx [RubyVM::MJIT::Context] + # @param asm [RubyVM::MJIT::Assembler] + def nop(jit, ctx, asm) + # Do nothing + KeepCompiling + end + # getlocal # setlocal # getblockparam