rubyx/lib/mom/instruction/slot_move.rb
Torsten Ruger 03a4e04f7e rename self to receiver
just because it is a keyword and can’t be used
2018-03-14 20:26:13 +05:30

16 lines
348 B
Ruby

module Mom
#SlotMove is a SlotLoad where the right side is a slot, just like the left.
class SlotMove < SlotLoad
def initialize(left , right)
right = SlotDefinition.new(right.shift , right) if right.is_a? Array
super(left , right)
end
def to_risc(context)
Risc::Label.new(self,"SlotMove")
end
end
end