remove walue which was eold
This commit is contained in:
parent
965e5f2a0f
commit
dbbcc738c4
@ -79,7 +79,7 @@ require_relative "instruction"
|
||||
require_relative "compiled_method"
|
||||
require_relative "frame"
|
||||
require_relative "message"
|
||||
require_relative "value"
|
||||
require_relative "slot"
|
||||
require_relative "type"
|
||||
require_relative "object"
|
||||
require_relative "constants"
|
||||
|
@ -1,4 +1,3 @@
|
||||
require_relative "value"
|
||||
|
||||
module Virtual
|
||||
# Integer and (Object) References are the main derived classes, but float will come and ...
|
||||
|
@ -1,36 +0,0 @@
|
||||
module Virtual
|
||||
|
||||
# the virtual machine is implemented in values (a c++ version of oo).
|
||||
# Values have types which are represented as classes, instances of Type to be precise
|
||||
|
||||
# Values must really be Constants or Variables, ie have a storage space
|
||||
|
||||
class Walue
|
||||
def type
|
||||
raise "abstract called for #{self.class}"
|
||||
end
|
||||
def == other
|
||||
return false unless other.class == self.class
|
||||
Sof::Util.attributes(self).each do |a|
|
||||
begin
|
||||
left = send(a)
|
||||
rescue NoMethodError
|
||||
next # not using instance variables that are not defined as attr_readers for equality
|
||||
end
|
||||
begin
|
||||
right = other.send(a)
|
||||
rescue NoMethodError
|
||||
return false
|
||||
end
|
||||
return false unless left.class == right.class
|
||||
return false unless left == right
|
||||
end
|
||||
return true
|
||||
end
|
||||
private #can't instantiate, must be constant or variable
|
||||
def initialize
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
require_relative "slot"
|
Loading…
Reference in New Issue
Block a user