rubyx/lib/vool/statements/local_assignment.rb
Torsten Ruger ee0a1ca823 renaming methods args and frame
to arguments_type and frame_type, because that is what they are
In honour of setup bug, where the types of those types were loaded,
instead of just them types
2018-04-05 12:22:14 +03:00

23 lines
475 B
Ruby

module Vool
class LocalAssignment < Assignment
def normalize
super
return LocalAssignment.new(@name , @value)
end
def to_mom( method )
if method.arguments_type.variable_index(@name)
type = :arguments
else
type = :frame
end
to = Mom::SlotDefinition.new(:message ,[ type , @name])
from = @value.slot_definition(method)
return chain_assign( Mom::SlotLoad.new(to,from) , method)
end
end
end