2017-09-11 13:22:33 +02:00
|
|
|
module Mom
|
|
|
|
|
|
|
|
# Preamble when entering the method body.
|
|
|
|
# Acquiring the message basically.
|
|
|
|
#
|
|
|
|
# Currently messages are hardwired as a linked list,
|
|
|
|
# but this does not account for continuations or closures and
|
|
|
|
# so will have to be changed.
|
|
|
|
#
|
|
|
|
# With the current setup this maps to a single SlotMove, ie 2 risc Instructions
|
|
|
|
# But clearer this way.
|
|
|
|
#
|
|
|
|
class MessageSetup < Instruction
|
|
|
|
attr_reader :method
|
|
|
|
|
|
|
|
def initialize(method)
|
|
|
|
@method = method
|
|
|
|
end
|
2018-03-13 11:46:06 +01:00
|
|
|
|
|
|
|
def to_risc(compiler)
|
2018-03-14 15:55:21 +01:00
|
|
|
Risc::Label.new(self,"MethodSetup")
|
2018-03-13 11:46:06 +01:00
|
|
|
end
|
|
|
|
|
2017-09-11 13:22:33 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
end
|