summaryrefslogtreecommitdiff
path: root/tool/ruby_vm/views
diff options
context:
space:
mode:
Diffstat (limited to 'tool/ruby_vm/views')
-rw-r--r--tool/ruby_vm/views/_mjit_compile_insn.erb5
-rw-r--r--tool/ruby_vm/views/_mjit_compile_insn_body.erb3
-rw-r--r--tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb13
-rw-r--r--tool/ruby_vm/views/_mjit_compile_send.erb4
-rw-r--r--tool/ruby_vm/views/mjit_compile.inc.erb6
5 files changed, 4 insertions, 27 deletions
diff --git a/tool/ruby_vm/views/_mjit_compile_insn.erb b/tool/ruby_vm/views/_mjit_compile_insn.erb
index e0955687cc..90127aa330 100644
--- a/tool/ruby_vm/views/_mjit_compile_insn.erb
+++ b/tool/ruby_vm/views/_mjit_compile_insn.erb
@@ -20,11 +20,6 @@
MAYBE_UNUSED(<%= ope.fetch(:decl) %>) = (<%= ope.fetch(:type) %>)operands[<%= i %>];
% end
%
-% # JIT: Declare stack_size to be used in some macro of _mjit_compile_insn_body.erb
- if (status->local_stack_p) {
- fprintf(f, " MAYBE_UNUSED(unsigned int) stack_size = %u;\n", b->stack_size);
- }
-%
% # JIT: Declare variables for operands, popped values and return values
% insn.declarations.each do |decl|
fprintf(f, " <%= decl %>;\n");
diff --git a/tool/ruby_vm/views/_mjit_compile_insn_body.erb b/tool/ruby_vm/views/_mjit_compile_insn_body.erb
index 5851313bf7..66c4314380 100644
--- a/tool/ruby_vm/views/_mjit_compile_insn_body.erb
+++ b/tool/ruby_vm/views/_mjit_compile_insn_body.erb
@@ -69,9 +69,6 @@
% end
% when /\A\s+DISPATCH_ORIGINAL_INSN\([^)]+\);\s+\z/
% # For `opt_xxx`'s fallbacks.
- if (status->local_stack_p) {
- fprintf(f, " reg_cfp->sp = (VALUE *)reg_cfp->bp + %d;\n", b->stack_size + 1);
- }
if (!body->catch_except_p) {
fprintf(f, " reg_cfp->pc = original_body_iseq + %d;\n", pos);
}
diff --git a/tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb b/tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb
index 1230ca508e..6004504c06 100644
--- a/tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb
+++ b/tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb
@@ -12,15 +12,4 @@
}
%
% # JIT: move sp to use or preserve stack variables
- if (status->local_stack_p) {
-% # JIT-only behavior (pushing JIT's local variables to VM's stack):
- rb_snum_t i, push_size;
- push_size = -<%= insn.call_attribute('sp_inc') %> + <%= insn.rets.size %> - <%= insn.pops.size %>;
- fprintf(f, " reg_cfp->sp = (VALUE *)reg_cfp->bp + %ld + 1;\n", push_size); /* POPN(INSN_ATTR(popn)); */
- for (i = 0; i < push_size; i++) { /* TODO: use memcpy? */
- fprintf(f, " *(reg_cfp->sp + %ld) = stack[%ld];\n", i - push_size, (rb_snum_t)b->stack_size - push_size + i);
- }
- }
- else {
- fprintf(f, " reg_cfp->sp = (VALUE *)reg_cfp->bp + %d;\n", b->stack_size + 1 - <%= insn.pops.size %>); /* POPN(INSN_ATTR(popn)); */
- }
+ fprintf(f, " reg_cfp->sp = (VALUE *)reg_cfp->bp + %d;\n", b->stack_size + 1 - <%= insn.pops.size %>); /* POPN(INSN_ATTR(popn)); */
diff --git a/tool/ruby_vm/views/_mjit_compile_send.erb b/tool/ruby_vm/views/_mjit_compile_send.erb
index 0a01ea2f86..6944903821 100644
--- a/tool/ruby_vm/views/_mjit_compile_send.erb
+++ b/tool/ruby_vm/views/_mjit_compile_send.erb
@@ -24,10 +24,6 @@
int param_size = iseq->body->param.size; /* TODO: check calling->argc for argument_arity_error */
fprintf(f, "{\n");
-% # JIT: Declare stack_size to be used in some macro of _mjit_compile_insn_body.erb
- if (status->local_stack_p) {
- fprintf(f, " MAYBE_UNUSED(unsigned int) stack_size = %u;\n", b->stack_size);
- }
% # JIT: Invalidate call cache if it requires vm_search_method. This allows to inline some of following things.
<%= render 'mjit_compile_send_guard' -%>
diff --git a/tool/ruby_vm/views/mjit_compile.inc.erb b/tool/ruby_vm/views/mjit_compile.inc.erb
index ee29693894..7749984c36 100644
--- a/tool/ruby_vm/views/mjit_compile.inc.erb
+++ b/tool/ruby_vm/views/mjit_compile.inc.erb
@@ -31,13 +31,13 @@
% # reg_cfp: the second argument of _mjitXXX
% # GET_CFP(): refers to `reg_cfp`
% # GET_EP(): refers to `reg_cfp->ep`
-% # GET_SP(): refers to `reg_cfp->sp`, or `(stack + stack_size)` if local_stack_p
+% # GET_SP(): refers to `reg_cfp->sp`
% # GET_SELF(): refers to `reg_cfp->self`
% # GET_LEP(): refers to `VM_EP_LEP(reg_cfp->ep)`
% # EXEC_EC_CFP(): refers to `val = vm_exec(ec, TRUE)` with frame setup
% # CALL_METHOD(): using `GET_CFP()` and `EXEC_EC_CFP()`
-% # TOPN(): refers to `reg_cfp->sp`, or `*(stack + (stack_size - num - 1))` if local_stack_p
-% # STACK_ADDR_FROM_TOP(): refers to `reg_cfp->sp`, or `stack + (stack_size - num)` if local_stack_p
+% # TOPN(): refers to `reg_cfp->sp`
+% # STACK_ADDR_FROM_TOP(): refers to `reg_cfp->sp`
% # DISPATCH_ORIGINAL_INSN(): expanded in _mjit_compile_insn.erb
% # THROW_EXCEPTION(): specially defined for JIT
% # RESTORE_REGS(): specially defined for `leave`