2017-01-19 08:02:29 +01:00
|
|
|
module Risc
|
2015-05-06 07:38:29 +02:00
|
|
|
# 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)
|
2015-06-29 09:55:22 +02:00
|
|
|
# The mapping into arrays is a straightforward matter, but happens in the
|
|
|
|
# next level down, the register machine.
|
2015-05-06 07:38:29 +02:00
|
|
|
|
|
|
|
# Four known objects exist and those correspond to subclasses:
|
|
|
|
# - the message that has been received: MessageSlot
|
2016-12-21 17:51:22 +01:00
|
|
|
# - the named_list of the method that is executing (local variables): NamedListSlot
|
2015-10-07 09:04:00 +02:00
|
|
|
# - self as an object: SelfsSlot
|
2015-06-29 19:55:45 +02:00
|
|
|
# - a message that will be sent, NewMessageSlot
|
2015-05-06 07:38:29 +02:00
|
|
|
|
2016-12-21 17:51:22 +01:00
|
|
|
# additionally named_list, self and return are slots in Message and NewMessage
|
2015-05-06 07:38:29 +02:00
|
|
|
|
|
|
|
# Slot has a lot of small subclasses
|
|
|
|
# Names for the slots avoid indexes
|
|
|
|
|
|
|
|
|
|
|
|
end
|