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

14 lines
332 B
Ruby

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