summaryrefslogtreecommitdiff
path: root/tool/ruby_vm
diff options
context:
space:
mode:
Diffstat (limited to 'tool/ruby_vm')
-rw-r--r--tool/ruby_vm/views/_mjit_compile_send.erb3
1 files changed, 3 insertions, 0 deletions
diff --git a/tool/ruby_vm/views/_mjit_compile_send.erb b/tool/ruby_vm/views/_mjit_compile_send.erb
index cb7c1f40f8..b1dc0e72c8 100644
--- a/tool/ruby_vm/views/_mjit_compile_send.erb
+++ b/tool/ruby_vm/views/_mjit_compile_send.erb
@@ -58,6 +58,9 @@
fprintf(f, " VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_FINISH);\n");
fprintf(f, " v = vm_exec(ec, TRUE);\n");
}
+ else if (body == iseq->body) { /* inline recursive call */
+ fprintf(f, " v = %s(ec, ec->cfp);\n", status->funcname);
+ }
else {
fprintf(f, " if ((v = mjit_exec(ec)) == Qundef) {\n");
fprintf(f, " VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_FINISH);\n"); /* This is vm_call0_body's code after vm_call_iseq_setup */