Fix invokebuiltin in Ruby MJIT

45fe7f7575/tool/ruby_vm/views/_mjit_compile_invokebuiltin.erb (L21)
has not been ported correctly.
This commit is contained in:
Takashi Kokubun 2022-11-13 21:14:46 -08:00
parent 3dd4e381fe
commit 96d29dff66
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD
2 changed files with 11 additions and 4 deletions

View file

@ -446,9 +446,10 @@ module RubyVM::MJIT
def compile_invokebuiltin(f, insn, stack_size, sp_inc, body, operands)
bf = C.RB_BUILTIN.new(operands[0])
if bf.compiler > 0
index = (insn.name == :invokebuiltin ? -1 : operands[1])
C.fprintf(f, "{\n")
C.fprintf(f, " VALUE val;\n")
C.builtin_compiler(f, bf, operands[1], stack_size, body.builtin_inline_p)
C.builtin_compiler(f, bf, index, stack_size, body.builtin_inline_p)
C.fprintf(f, " stack[#{stack_size + sp_inc - 1}] = val;\n")
C.fprintf(f, "}\n")
return true