From 4839e0d24509cc97a37bf715c2b03670ba8181fe Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Fri, 27 Jul 2018 10:46:22 +0300 Subject: [PATCH] minor naming and spaces --- lib/mom/instruction/message_setup.rb | 12 ++++++------ lib/mom/instruction/return_sequence.rb | 2 +- lib/parfait/callable_method.rb | 4 ++-- lib/vool/assignment.rb | 1 - test/arm/test_translator.rb | 2 +- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/mom/instruction/message_setup.rb b/lib/mom/instruction/message_setup.rb index a4b8b166..d8f3eb8f 100644 --- a/lib/mom/instruction/message_setup.rb +++ b/lib/mom/instruction/message_setup.rb @@ -36,16 +36,16 @@ module Mom def build_with(builder) case from = method_source when Parfait::CallableMethod - builder.build { callable_method << from } + builder.build { callable << from } when Parfait::CacheEntry builder.build do cache_entry << from - callable_method << cache_entry[:cached_method] + callable << cache_entry[:cached_method] end when Integer builder.build do arguments << message[:arguments] - callable_method << arguments[ from ] + callable << arguments[ from ] end else raise "unknown source #{method_source.class}:#{method_source}" @@ -69,15 +69,15 @@ module Mom message[:next_message] << next_message next_message[:caller] << message - type << callable_method[:arguments_type] + type << callable[:arguments_type] named_list << next_message[:arguments] named_list[:type] << type - type << callable_method[:frame_type] + type << callable[:frame_type] named_list << next_message[:frame] named_list[:type] << type - next_message[:method] << callable_method + next_message[:method] << callable #store next.next back into space #FIXME in a multithreaded future this should be done soon after getting diff --git a/lib/mom/instruction/return_sequence.rb b/lib/mom/instruction/return_sequence.rb index 6538d17e..e37bbb21 100644 --- a/lib/mom/instruction/return_sequence.rb +++ b/lib/mom/instruction/return_sequence.rb @@ -32,7 +32,7 @@ module Mom end def to_s - "ReturnSequence in (#{compiler.method.name})" + "ReturnSequence" end end diff --git a/lib/parfait/callable_method.rb b/lib/parfait/callable_method.rb index 39664842..4e949c2f 100644 --- a/lib/parfait/callable_method.rb +++ b/lib/parfait/callable_method.rb @@ -42,8 +42,8 @@ module Parfait end def add_block(bl) - block = self.blocks - bl.set_next(block) if(block) + was = @blocks + bl.set_next(was) if(was) @blocks = bl end diff --git a/lib/vool/assignment.rb b/lib/vool/assignment.rb index 67a3e6cb..4a7677a9 100644 --- a/lib/vool/assignment.rb +++ b/lib/vool/assignment.rb @@ -15,7 +15,6 @@ module Vool at_depth(depth , "#{@name} = #{@value}") end - def chain_assign(assign , compiler) return assign unless @value.is_a?(SendStatement) @value.to_mom(compiler) << assign diff --git a/test/arm/test_translator.rb b/test/arm/test_translator.rb index 12229432..33d1bf5b 100644 --- a/test/arm/test_translator.rb +++ b/test/arm/test_translator.rb @@ -18,7 +18,7 @@ module Arm assert_equal :r1 , @codes.left end def test_slot_right - assert_equal 8 , @codes.right + assert_equal 4 , @codes.right end def test_next_from assert_equal :r1 , @codes.next.from.symbol