2018-06-29 21:46:39 +02:00
|
|
|
module Vool
|
|
|
|
|
|
|
|
class LocalAssignment < Assignment
|
|
|
|
|
2018-07-05 13:02:38 +02:00
|
|
|
def to_mom( compiler )
|
|
|
|
if compiler.method.arguments_type.variable_index(@name)
|
2018-06-29 21:46:39 +02:00
|
|
|
type = :arguments
|
|
|
|
else
|
|
|
|
type = :frame
|
|
|
|
end
|
|
|
|
to = Mom::SlotDefinition.new(:message ,[ type , @name])
|
2018-07-05 13:02:38 +02:00
|
|
|
from = @value.slot_definition(compiler)
|
|
|
|
return chain_assign( Mom::SlotLoad.new(to,from) , compiler)
|
2018-06-29 21:46:39 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|