diff options
author | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-16 17:01:05 +0000 |
---|---|---|
committer | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-16 17:01:05 +0000 |
commit | b0614decfc2c756abd37347477f262bb09c27233 (patch) | |
tree | 546f71635646205d0cee6b74caa50d1cd3672ed6 /tool | |
parent | dcf5c19c9f89d732da70a1a16a2fe60cd1999bcc (diff) | |
download | ruby-b0614decfc2c756abd37347477f262bb09c27233.tar.gz |
Implement single-level basic method inlining in JIT
"Basic" means it does not omit a call frame.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rw-r--r-- | tool/ruby_vm/views/_mjit_compile_send.erb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tool/ruby_vm/views/_mjit_compile_send.erb b/tool/ruby_vm/views/_mjit_compile_send.erb index e2d24bd3f7..41a77189d9 100644 --- a/tool/ruby_vm/views/_mjit_compile_send.erb +++ b/tool/ruby_vm/views/_mjit_compile_send.erb @@ -65,7 +65,13 @@ fprintf(f, " v = vm_exec(ec, TRUE);\n"); } else { - fprintf(f, " if ((v = mjit_exec(ec)) == Qundef) {\n"); + if (status->iseq_for_pos != NULL && status->iseq_for_pos[pos] == iseq->body) { + fprintf(f, " v = _mjit_inlined_%d(ec, ec->cfp);\n", pos); + } + else { + fprintf(f, " v = mjit_exec(ec);\n"); + } + fprintf(f, " if (v == 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 */ fprintf(f, " v = vm_exec(ec, FALSE);\n"); fprintf(f, " }\n"); |