diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-12 08:38:12 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-12 08:38:12 +0000 |
commit | fbacf5faade7207dd4d2a25235bf0af5f04a7ce7 (patch) | |
tree | 4522e92604be44190102e2c7fac527494f343a23 /tool/ruby_vm/models | |
parent | 8a72c77c7920d129818b7b83bb4fa669cd7e3f7d (diff) | |
download | ruby-fbacf5faade7207dd4d2a25235bf0af5f04a7ce7.tar.gz |
tool/ruby_vm support for pre-2.0 BASERUBY
This was not requested :) but actually easier than the previous
so I just did it anyway.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/ruby_vm/models')
-rw-r--r-- | tool/ruby_vm/models/bare_instructions.rb | 5 | ||||
-rw-r--r-- | tool/ruby_vm/models/operands_unifications.rb | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/tool/ruby_vm/models/bare_instructions.rb b/tool/ruby_vm/models/bare_instructions.rb index a9cb4db953..16d5782e2f 100644 --- a/tool/ruby_vm/models/bare_instructions.rb +++ b/tool/ruby_vm/models/bare_instructions.rb @@ -28,7 +28,7 @@ class RubyVM::BareInstructions @pops = typesplit @sig[:pop].reject {|i| i == '...' } @rets = typesplit @sig[:ret].reject {|i| i == '...' } @attrs = opts[:attributes].map {|i| - RubyVM::Attribute.new insn: self, **i + RubyVM::Attribute.new i.merge(:insn => self) }.each_with_object({}) {|a, h| h[a.key] = a } @@ -149,8 +149,7 @@ class RubyVM::BareInstructions end @instances = RubyVM::InsnsDef.map {|h| - hh = h.merge(:template => h) - new hh + new h.merge(:template => h) } def self.fetch name diff --git a/tool/ruby_vm/models/operands_unifications.rb b/tool/ruby_vm/models/operands_unifications.rb index 2a34ea0f62..184bb7d79c 100644 --- a/tool/ruby_vm/models/operands_unifications.rb +++ b/tool/ruby_vm/models/operands_unifications.rb @@ -30,7 +30,7 @@ class RubyVM::OperandsUnifications < RubyVM::BareInstructions json[:name] = parts[:name] @preamble = parts[:preamble] @spec = parts[:spec] - super template: template, **json + super json.merge(:template => template) parts[:vars].each do |v| @variables[v[:name]] ||= v end |