diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/mjit/compiler.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/mjit/compiler.rb b/lib/mjit/compiler.rb index 9e6ea0a119..db8327b863 100644 --- a/lib/mjit/compiler.rb +++ b/lib/mjit/compiler.rb @@ -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 |
