diff options
author | Takashi Kokubun <[email protected]> | 2023-03-10 13:15:22 -0800 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2023-03-10 13:15:48 -0800 |
commit | 6440d159b31feb495cacb279b204cdb6b54e721f (patch) | |
tree | c5087f8be91aff4e85d154473ffb808b74282943 /tool/ruby_vm/views | |
parent | cdece5cf36ec5414ed55fb8d759d2ba20ff209c1 (diff) |
RJIT: Simplify RubyVM::RJIT::Instruction
Diffstat (limited to 'tool/ruby_vm/views')
-rw-r--r-- | tool/ruby_vm/views/lib/ruby_vm/rjit/instruction.rb.erb | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/tool/ruby_vm/views/lib/ruby_vm/rjit/instruction.rb.erb b/tool/ruby_vm/views/lib/ruby_vm/rjit/instruction.rb.erb index 1bc22de4d0..055e769aec 100644 --- a/tool/ruby_vm/views/lib/ruby_vm/rjit/instruction.rb.erb +++ b/tool/ruby_vm/views/lib/ruby_vm/rjit/instruction.rb.erb @@ -1,18 +1,5 @@ module RubyVM::RJIT # :nodoc: all - Instruction = Struct.new( - :name, - :bin, - :len, - :expr, - :declarations, - :preamble, - :opes, - :pops, - :rets, - :always_leaf?, - :leaf_without_check_ints?, - :handles_sp?, - ) + Instruction = Data.define(:name, :bin, :len) INSNS = { % RubyVM::Instructions.each_with_index do |insn, i| @@ -20,19 +7,6 @@ module RubyVM::RJIT # :nodoc: all name: :<%= insn.name %>, bin: <%= i %>, # BIN(<%= insn.name %>) len: <%= insn.width %>, # insn_len -% unless insn.name.start_with?('trace_') - expr: <<-EXPR, -<%= insn.expr.expr.dump.sub(/\A"/, '').sub(/"\z/, '').gsub(/\\n/, "\n").gsub(/\\t/, ' ' * 8) %> - EXPR - declarations: <%= insn.declarations.inspect %>, - preamble: <%= insn.preamble.map(&:expr).inspect %>, - opes: <%= insn.opes.inspect %>, - pops: <%= insn.pops.inspect %>, - rets: <%= insn.rets.inspect %>, - always_leaf?: <%= insn.always_leaf? %>, - leaf_without_check_ints?: <%= insn.leaf_without_check_ints? %>, - handles_sp?: <%= insn.handles_sp? %>, -% end ), % end } |