From 5f3744d6af64c2641fa2d041bc66e0c8e45617ad Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Sat, 31 Dec 2016 15:20:02 +0200 Subject: [PATCH] remove unused attributes functions --- lib/typed/parfait/class.rb | 3 --- lib/typed/parfait/dictionary.rb | 3 --- lib/typed/parfait/list.rb | 4 ---- lib/typed/parfait/message.rb | 6 +----- lib/typed/parfait/space.rb | 4 ---- lib/typed/parfait/type.rb | 4 +--- lib/typed/parfait/typed_method.rb | 6 +----- lib/typed/parfait/word.rb | 3 --- 8 files changed, 3 insertions(+), 30 deletions(-) diff --git a/lib/typed/parfait/class.rb b/lib/typed/parfait/class.rb index a8fb0596..e72b84c7 100644 --- a/lib/typed/parfait/class.rb +++ b/lib/typed/parfait/class.rb @@ -16,9 +16,6 @@ module Parfait class Class < Object include Behaviour - def self.attributes - [:instance_type , :name , :super_class_name , :instance_names , :instance_methods] - end attr_reader :instance_type , :name , :instance_methods , :super_class_name diff --git a/lib/typed/parfait/dictionary.rb b/lib/typed/parfait/dictionary.rb index a96bd404..f73bea72 100644 --- a/lib/typed/parfait/dictionary.rb +++ b/lib/typed/parfait/dictionary.rb @@ -2,9 +2,6 @@ module Parfait class Dictionary < Object - def self.attributes - [:keys, :values] - end # only empty initialization for now # diff --git a/lib/typed/parfait/list.rb b/lib/typed/parfait/list.rb index 0a089db5..27456bf2 100644 --- a/lib/typed/parfait/list.rb +++ b/lib/typed/parfait/list.rb @@ -68,10 +68,6 @@ module Parfait set_internal_word( 2 , len) end - def self.attributes - [:indexed_length] - end - def indexed_length get_length() end diff --git a/lib/typed/parfait/message.rb b/lib/typed/parfait/message.rb index 826f1835..3b88b7eb 100644 --- a/lib/typed/parfait/message.rb +++ b/lib/typed/parfait/message.rb @@ -9,12 +9,8 @@ module Parfait class Message < Object - def self.attributes - [:next_message , :receiver , :locals , :return_address , - :return_value, :caller , :name , :arguments] - end - attr_reader :locals , :receiver , :return_value , :name + attr_reader :locals , :receiver , :return_value , :name attr_accessor :next_message def initialize next_m diff --git a/lib/typed/parfait/space.rb b/lib/typed/parfait/space.rb index bab4a5d4..0271dcc7 100644 --- a/lib/typed/parfait/space.rb +++ b/lib/typed/parfait/space.rb @@ -46,10 +46,6 @@ module Parfait end end - def self.attributes - [:classes , :types, :first_message] - end - attr_reader :classes , :first_message def each_type diff --git a/lib/typed/parfait/type.rb b/lib/typed/parfait/type.rb index 01e004e8..883f2c9e 100644 --- a/lib/typed/parfait/type.rb +++ b/lib/typed/parfait/type.rb @@ -34,9 +34,7 @@ module Parfait class Type < Object - def self.attributes - [:names , :types , :object_class , :methods ] - end + attr_reader :object_class , :names , :types , :methods def self.for_hash( object_class , hash) diff --git a/lib/typed/parfait/typed_method.rb b/lib/typed/parfait/typed_method.rb index 0e3e19af..c553f425 100644 --- a/lib/typed/parfait/typed_method.rb +++ b/lib/typed/parfait/typed_method.rb @@ -22,10 +22,6 @@ module Parfait class TypedMethod < Object - def self.attributes - [:name , :source , :instructions , :binary ,:arguments , :for_type, :locals ] - end - attr_reader :name , :instructions , :for_type ,:arguments , :locals , :binary # not part of the parfait model, hence ruby accessor @@ -40,7 +36,7 @@ module Parfait @name = name @binary = BinaryCode.new 0 @arguments = arguments - @locals = Parfait.object_space.get_class_by_name( :NamedList ).instance_type + @locals = Parfait.object_space.get_class_by_name( :NamedList ).instance_type end def set_instructions(inst) diff --git a/lib/typed/parfait/word.rb b/lib/typed/parfait/word.rb index d014417e..0a477ab1 100644 --- a/lib/typed/parfait/word.rb +++ b/lib/typed/parfait/word.rb @@ -13,9 +13,6 @@ module Parfait # Object length is measured in non-type cells though class Word < Object - def self.attributes - [:char_length] - end attr_reader :char_length #semi "indexed" methods for interpreter