2014-10-06 18:57:44 +02:00
|
|
|
module Arm
|
|
|
|
|
|
|
|
# "Boot" the register machine at the function given
|
2015-06-10 10:43:50 +02:00
|
|
|
# meaning jump to that function currently. Maybe better to do some machine setup
|
|
|
|
# and possibly some cleanup/exit has to tie in, but that is not this day
|
2014-10-06 18:57:44 +02:00
|
|
|
|
|
|
|
class MainImplementation
|
|
|
|
def run block
|
|
|
|
block.codes.dup.each do |code|
|
|
|
|
next unless code.is_a? Register::RegisterMain
|
|
|
|
call = ArmMachine.b( code.method )
|
|
|
|
block.replace(code , call )
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2015-06-01 07:40:17 +02:00
|
|
|
Virtual.machine.add_pass "Arm::MainImplementation"
|
2014-10-06 18:57:44 +02:00
|
|
|
end
|