rubyx/lib/arm/passes/set_implementation.rb
2015-06-23 19:55:54 +03:00

14 lines
334 B
Ruby

module Arm
class SetImplementation
def run block
block.codes.dup.each do |code|
next unless code.is_a? Register::SetSlot
store = ArmMachine.str( code.register , code.array , code.index )
block.replace(code , store )
end
end
end
Virtual.machine.add_pass "Arm::SetImplementation"
end