2017-04-12 19:18:41 +02:00
|
|
|
module Vool
|
|
|
|
|
|
|
|
class LocalAssignment < Assignment
|
2018-03-15 16:03:38 +01:00
|
|
|
|
2017-04-12 19:18:41 +02:00
|
|
|
def to_mom( method )
|
2018-04-05 11:22:14 +02:00
|
|
|
if method.arguments_type.variable_index(@name)
|
2017-04-13 13:14:43 +02:00
|
|
|
type = :arguments
|
|
|
|
else
|
|
|
|
type = :frame
|
|
|
|
end
|
2018-03-15 16:03:38 +01:00
|
|
|
to = Mom::SlotDefinition.new(:message ,[ type , @name])
|
|
|
|
from = @value.slot_definition(method)
|
|
|
|
return chain_assign( Mom::SlotLoad.new(to,from) , method)
|
2017-04-12 19:18:41 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|