rubyx/stash/slot.rb
Torsten Ruger aa79e41d1c rename register to risc
seems to fit the layer much better as we really have a very reduced
instruction set
2017-01-19 09:02:29 +02:00

21 lines
784 B
Ruby

module Risc
# 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)
# The mapping into arrays is a straightforward matter, but happens in the
# next level down, the register machine.
# Four known objects exist and those correspond to subclasses:
# - the message that has been received: MessageSlot
# - the named_list of the method that is executing (local variables): NamedListSlot
# - self as an object: SelfsSlot
# - a message that will be sent, NewMessageSlot
# additionally named_list, self and return are slots in Message and NewMessage
# Slot has a lot of small subclasses
# Names for the slots avoid indexes
end