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