summaryrefslogtreecommitdiff
path: root/tool/ruby_vm/views/mjit_compile.inc.erb
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-07-12 14:53:54 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-07-13 08:56:18 +0900
commit7e536b3be26ae48738a036a58be8dfa380bd21da (patch)
tree426cb1018cf6afc4b7a97c204d3c863622436fb6 /tool/ruby_vm/views/mjit_compile.inc.erb
parent802bcd3ec81c1f5de77dbfbe8d9934c5760c85d7 (diff)
builtin.h: avoid copy&paste
Instead of doubling the invokebuiltin logic here and there, use the same insns.def definition for both MJIT/non-JIT situations.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3305
Diffstat (limited to 'tool/ruby_vm/views/mjit_compile.inc.erb')
-rw-r--r--tool/ruby_vm/views/mjit_compile.inc.erb8
1 files changed, 4 insertions, 4 deletions
diff --git a/tool/ruby_vm/views/mjit_compile.inc.erb b/tool/ruby_vm/views/mjit_compile.inc.erb
index e3be549181..6836d59a4f 100644
--- a/tool/ruby_vm/views/mjit_compile.inc.erb
+++ b/tool/ruby_vm/views/mjit_compile.inc.erb
@@ -63,15 +63,15 @@ switch (insn) {
}
% when 'getinstancevariable', 'setinstancevariable'
<%= render 'mjit_compile_ivar', locals: { insn: insn } -%>
+% when 'invokebuiltin', 'opt_invokebuiltin_delegate'
+ {
+<%= render 'mjit_compile_invokebuiltin', locals: { insn: insn } -%>
+ }
% when 'leave', 'opt_invokebuiltin_delegate_leave'
{
% # opt_invokebuiltin_delegate_leave also implements leave insn. We need to handle it here for inlining.
% if insn.name == 'opt_invokebuiltin_delegate_leave'
- fprintf(f, "{\n");
- fprintf(f, " VALUE val;\n");
<%= render 'mjit_compile_invokebuiltin', locals: { insn: insn } -%>
- fprintf(f, " stack[0] = val;\n");
- fprintf(f, "}\n");
% else
if (b->stack_size != 1) {
if (mjit_opts.warnings || mjit_opts.verbose)