summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
-rw-r--r--tool/ruby_vm/models/bare_instructions.rb5
-rw-r--r--tool/ruby_vm/models/instructions.rb1
-rw-r--r--tool/ruby_vm/models/zjit_instructions.rb58
-rw-r--r--tool/ruby_vm/views/_insn_sp_pc_dependency.erb27
-rw-r--r--tool/ruby_vm/views/_zjit_helpers.erb14
-rw-r--r--tool/ruby_vm/views/_zjit_instruction.erb8
-rw-r--r--tool/ruby_vm/views/insns.inc.erb5
-rw-r--r--tool/ruby_vm/views/insns_info.inc.erb1
-rw-r--r--tool/ruby_vm/views/lib/ruby_vm/rjit/instruction.rb.erb14
-rw-r--r--tool/ruby_vm/views/vm.inc.erb4
10 files changed, 137 insertions, 0 deletions
@@ -148,6 +148,10 @@ class RubyVM::BareInstructions
@variables.find { |_, var_info| var_info[:type] == 'CALL_DATA' }
end
private
def check_attribute_consistency
@@ -186,6 +190,7 @@ class RubyVM::BareInstructions
generate_attribute 'rb_snum_t', 'sp_inc', rets.size - pops.size
generate_attribute 'bool', 'handles_sp', default_definition_of_handles_sp
generate_attribute 'bool', 'leaf', default_definition_of_leaf
end
def default_definition_of_handles_sp
@@ -17,5 +17,6 @@ RubyVM::Instructions = RubyVM::BareInstructions.to_a + \
RubyVM::OperandsUnifications.to_a + \
RubyVM::InstructionsUnifications.to_a
require_relative 'trace_instructions'
RubyVM::Instructions.freeze
@@ -0,0 +1,58 @@
@@ -0,0 +1,27 @@
@@ -0,0 +1,14 @@
@@ -0,0 +1,8 @@
@@ -12,6 +12,9 @@
edit: __FILE__,
} -%>
/* BIN : Basic Instruction Name */
#define BIN(n) YARVINSN_##n
@@ -24,3 +27,5 @@ enum ruby_vminsn_type {
#define ASSERT_VM_INSTRUCTION_SIZE(array) \
STATIC_ASSERT(numberof_##array, numberof(array) == VM_INSTRUCTION_SIZE)
@@ -17,5 +17,6 @@
<%= render 'insn_operand_info' %>
<%= render 'leaf_helpers' %>
<%= render 'sp_inc_helpers' %>
<%= render 'attributes' %>
<%= render 'comptime_insn_stack_increase' %>
@@ -0,0 +1,14 @@
@@ -25,6 +25,10 @@
<%= render 'insn_entry', locals: { insn: insn } -%>
% end
%
% RubyVM::TraceInstructions.to_a.each do |insn|
<%= render 'trace_instruction', locals: { insn: insn } -%>
% end