diff --git a/lib/arm/arm_machine.rb b/lib/arm/arm_machine.rb index 1fcf1307..63aa7525 100644 --- a/lib/arm/arm_machine.rb +++ b/lib/arm/arm_machine.rb @@ -7,8 +7,7 @@ module Arm # Value functions are mapped to machines by concatenating the values class name + the methd name # Example: IntegerValue.plus( value ) -> Machine.signed_plus (value ) - # Also, shortcuts are created to easily instantiate Instruction objects. The "standard" set of instructions - # (arm-influenced) provides for normal operations on a register machine, + # Also, shortcuts are created to easily instantiate Instruction objects. # Example: pop -> StackInstruction.new( {:opcode => :pop}.merge(options) ) # Instructions work with options, so you can pass anything in, and the only thing the functions does # is save you typing the clazz.new. It passes the function name as the :opcode @@ -114,3 +113,9 @@ module Arm end Arm::ArmMachine.init require_relative "passes/call_implementation" +require_relative "passes/save_implementation" +require_relative "passes/transfer_implementation" +require_relative "passes/get_implementation" +require_relative "passes/set_implementation" +require_relative "passes/return_implementation" +require_relative "passes/constant_implementation" diff --git a/lib/register/passes/return_implementation.rb b/lib/register/passes/return_implementation.rb index 4b2eb666..062a6f36 100644 --- a/lib/register/passes/return_implementation.rb +++ b/lib/register/passes/return_implementation.rb @@ -18,5 +18,5 @@ module Register end end end - Virtual::BootSpace.space.add_pass_after "Register::ReturnImplementation" , "Virtual::GetImplementation" + Virtual::BootSpace.space.add_pass "Register::ReturnImplementation" end diff --git a/lib/register/passes/set_implementation.rb b/lib/register/passes/set_implementation.rb index e9a0b9c8..39a92f06 100644 --- a/lib/register/passes/set_implementation.rb +++ b/lib/register/passes/set_implementation.rb @@ -42,5 +42,5 @@ module Register end end end - Virtual::BootSpace.space.add_pass_after "Register::SetImplementation" , "Virtual::GetImplementation" + Virtual::BootSpace.space.add_pass "Register::SetImplementation" end diff --git a/lib/virtual/machine.rb b/lib/virtual/machine.rb index af00ac3a..67a85087 100644 --- a/lib/virtual/machine.rb +++ b/lib/virtual/machine.rb @@ -84,10 +84,11 @@ require_relative "type" require_relative "object" require_relative "constants" require_relative "boot_space" +# the passes _are_ order dependant require_relative "passes/send_implementation" require_relative "passes/get_implementation" -require_relative "passes/frame_implementation" require_relative "passes/enter_implementation" +require_relative "passes/frame_implementation" Sof::Volotile.add(Virtual::Block , [:method]) Sof::Volotile.add(Virtual::CompiledMethod , [:current]) diff --git a/lib/virtual/passes/enter_implementation.rb b/lib/virtual/passes/enter_implementation.rb index 3f686ae3..833a5872 100644 --- a/lib/virtual/passes/enter_implementation.rb +++ b/lib/virtual/passes/enter_implementation.rb @@ -13,5 +13,5 @@ module Virtual end end end - Virtual::BootSpace.space.add_pass_after "Virtual::EnterImplementation" , "Virtual::GetImplementation" + Virtual::BootSpace.space.add_pass "Virtual::EnterImplementation" end diff --git a/lib/virtual/passes/frame_implementation.rb b/lib/virtual/passes/frame_implementation.rb index ee1f4166..a02053bd 100644 --- a/lib/virtual/passes/frame_implementation.rb +++ b/lib/virtual/passes/frame_implementation.rb @@ -46,5 +46,5 @@ module Virtual end end end - Virtual::BootSpace.space.add_pass_after "Virtual::FrameImplementation" , "Virtual::GetImplementation" + Virtual::BootSpace.space.add_pass "Virtual::FrameImplementation" end diff --git a/lib/virtual/passes/get_implementation.rb b/lib/virtual/passes/get_implementation.rb index 4be100ec..05e073d7 100644 --- a/lib/virtual/passes/get_implementation.rb +++ b/lib/virtual/passes/get_implementation.rb @@ -11,5 +11,5 @@ module Virtual end end end - Virtual::BootSpace.space.add_pass_after "Virtual::GetImplementation", "Virtual::SendImplementation" + Virtual::BootSpace.space.add_pass "Virtual::GetImplementation" end