rubyx/lib/parfait/object.rb

25 lines
696 B
Ruby
Raw Normal View History

# to be precise, this should be an ObjectReference, as the Reference is a Value
# but we don't want to make that distinction all the time , so we don't.
2014-08-05 14:55:24 +02:00
# that does lead to the fact that we have Reference functions on the Object though
2014-08-05 14:55:24 +02:00
class Object < Value
def get_type()
OBJECT_TYPE
end
# This is the crux of the object system. The class of an object is stored in the objects
# memory (as opposed to an integer that has no memory and so always has the same class)
#
# In Salama we store the class in the Layout, and so the Layout is the only fixed
# data that every object carries.
2014-08-07 14:41:13 +02:00
def get_class()
@layout.get_class()
2014-08-06 17:37:19 +02:00
end
def get_layout()
@layout
end
2014-07-30 20:43:12 +02:00
end