From cc89e49a433f9835e993deed39b5d496f08d4f56 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Wed, 7 Oct 2015 10:04:00 +0300 Subject: [PATCH] renames SelfSlot to SelfsSlot in the hope to make a little more distinction --- lib/bosl/compiler/field_access.rb | 2 +- lib/virtual/slots/{self_slot.rb => selfs_slot.rb} | 6 +++--- lib/virtual/slots/slot.rb | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) rename lib/virtual/slots/{self_slot.rb => selfs_slot.rb} (83%) diff --git a/lib/bosl/compiler/field_access.rb b/lib/bosl/compiler/field_access.rb index ab2e56cb..5224230a 100644 --- a/lib/bosl/compiler/field_access.rb +++ b/lib/bosl/compiler/field_access.rb @@ -12,7 +12,7 @@ module Bosl index = @clazz.object_layout.variable_index(field_name) raise "field access, but no such field:#{field_name} for class #{@clazz.name}" unless index value = Virtual::Return.new(:int) - @method.source.add_code Virtual::Set.new( Virtual::SelfSlot.new(index, :int ) , value ) + @method.source.add_code Virtual::Set.new( Virtual::SelfsSlot.new(index, :int ) , value ) when :message #message Slot raise "message not yet" diff --git a/lib/virtual/slots/self_slot.rb b/lib/virtual/slots/selfs_slot.rb similarity index 83% rename from lib/virtual/slots/self_slot.rb rename to lib/virtual/slots/selfs_slot.rb index 50d70c2c..1fe9252d 100644 --- a/lib/virtual/slots/self_slot.rb +++ b/lib/virtual/slots/selfs_slot.rb @@ -8,12 +8,12 @@ module Virtual # (and slots in the next_message by instances of NewSelf) # # Additionally the current Self is represented as it's own top-level object. - # If self is an Object one can refer to it's instance variables as Slots in SelfSlot + # If self is an Object one can refer to it's instance variables as Slots in SelfsSlot # - # In Summary: class Self represents the self object and SelfSlot instances variables of + # In Summary: class Self represents the self object and SelfsSlot instances variables of # that object # - class SelfSlot < Slot + class SelfsSlot < Slot def initialize index , type , value = nil @index = index super( type , value ) diff --git a/lib/virtual/slots/slot.rb b/lib/virtual/slots/slot.rb index df2af5ea..ba809638 100644 --- a/lib/virtual/slots/slot.rb +++ b/lib/virtual/slots/slot.rb @@ -8,7 +8,7 @@ module Virtual # Four known objects exist and those correspond to subclasses: # - the message that has been received: MessageSlot # - the frame of the method that is executing (local variables): FrameSlot - # - self as an object: SelfSlot + # - self as an object: SelfsSlot # - a message that will be sent, NewMessageSlot # additionally frame, self and return are slots in Message and NewMessage @@ -41,6 +41,6 @@ module Virtual end require_relative "message_slot" -require_relative "self_slot" +require_relative "selfs_slot" require_relative "frame_slot" require_relative "new_message_slot"