From 886220d388f479f256c8754ef6525636cfd436e6 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Thu, 15 Dec 2016 19:43:53 +0200 Subject: [PATCH] remove unused variable class --- lib/register/boot.rb | 1 - lib/typed/parfait.rb | 1 - lib/typed/parfait/variable.rb | 19 ------------------- 3 files changed, 21 deletions(-) delete mode 100644 lib/typed/parfait/variable.rb diff --git a/lib/register/boot.rb b/lib/register/boot.rb index 404942b2..a8f9135e 100644 --- a/lib/register/boot.rb +++ b/lib/register/boot.rb @@ -132,7 +132,6 @@ module Register :TypedMethod => {:name => :Word, :source => :Object, :instructions => :Object, :binary => :Object, :arguments => :Type , :for_type => :Type, :locals => :Type } , :Value => {}, - :Variable => {:value_type => :Class, :name => :Word , :value => :Object} } end diff --git a/lib/typed/parfait.rb b/lib/typed/parfait.rb index 4cf1bd2c..3d972b7a 100644 --- a/lib/typed/parfait.rb +++ b/lib/typed/parfait.rb @@ -12,7 +12,6 @@ require_relative "parfait/word" require_relative "parfait/binary_code" require_relative "parfait/typed_method" require_relative "parfait/meta_class" -require_relative "parfait/variable" require_relative "parfait/dictionary" require_relative "parfait/type" require_relative "parfait/message" diff --git a/lib/typed/parfait/variable.rb b/lib/typed/parfait/variable.rb deleted file mode 100644 index fbd80acd..00000000 --- a/lib/typed/parfait/variable.rb +++ /dev/null @@ -1,19 +0,0 @@ -module Parfait - class Variable < Object - - def initialize type , name , value = nil - raise "not type #{type}(#{type.class})" unless Register.machine.space.get_class_by_name(type) - self.value_type , self.name , self.value = type , name , value - self.value = 0 if self.value_type == :Integer and value == nil - raise "must give name for variable" unless name - end - attributes [:value_type , :name, :value] - - def to_s - "Variable(#{self.value_type} ,#{self.name})" - end - def inspect - to_s - end - end -end