starting to clear up slots

mostly docs
This commit is contained in:
Torsten Ruger
2015-06-20 23:49:30 +03:00
parent 95bc824f9b
commit eeaf2d97de
7 changed files with 77 additions and 44 deletions

View File

@ -2,7 +2,7 @@ module Virtual
# A slot is a slot in an object. It is the storage location for a value.
# (Remember, values are typed)
# From a memory perspective a slot is an index into an array (the object)
# But we are not modelling the array here, but the index into it.
# We are not modelling the array here, but the index into it.
# Four known objects exist and those correspond to subclasses:
# - the message that has been received: MessageSlot
@ -21,15 +21,6 @@ module Virtual
FRAME_REGISTER = :r2
NEW_MESSAGE_REGISTER = :r3
MESSAGE_CALLER = 0
MESSAGE_RETURN_ADDRESS = 1
MESSAGE_EXCEPTION_ADDRESS = 2
MESSAGE_SELF = 3
MESSAGE_NAME = 4
MESSAGE_RETURN_VALUE = 5
MESSAGE_FRAME = 6
MESSAGE_PAYLOAD = 7
attr_accessor :index , :type , :value
private #abstract base class
@ -41,19 +32,9 @@ module Virtual
end
end
class FrameSlot < Slot
def initialize index , type = Unknown, value = nil
super
end
end
class SelfSlot < Slot
def initialize index , type = Unknown, value = nil
super
end
end
end
require_relative "message_slot"
require_relative "self_slot"
require_relative "frame_slot"
require_relative "new_message_slot"