start implementing return for constant
This commit is contained in:
@ -10,5 +10,14 @@ module Vool
|
||||
@return_value.collect(arr)
|
||||
super
|
||||
end
|
||||
|
||||
# To return form a method in mom instructions we need to do three things:
|
||||
# - store the given return value, this is a SlotMove / SlotConstant
|
||||
# - restore the previous message
|
||||
# - jump to the return address
|
||||
def to_mom( method )
|
||||
[Mom::SlotConstant.new([:message , :return_value] , @return_value)]
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user