diff --git a/lib/register/instructions/branch.rb b/lib/register/instructions/branch.rb index 61857e02..04fe3adf 100644 --- a/lib/register/instructions/branch.rb +++ b/lib/register/instructions/branch.rb @@ -11,7 +11,7 @@ module Register attr_reader :block def to_s - "Branch(block: #{block.name})" + "Branch: #{block.name}" end end diff --git a/lib/register/instructions/function_call.rb b/lib/register/instructions/function_call.rb index 0b65aa20..ab2e4b4b 100644 --- a/lib/register/instructions/function_call.rb +++ b/lib/register/instructions/function_call.rb @@ -10,7 +10,7 @@ module Register attr_reader :method def to_s - "FunctionCall(#{method.name})" + "FunctionCall: #{method.name}" end end diff --git a/lib/register/instructions/function_return.rb b/lib/register/instructions/function_return.rb index 2b5ec518..93393178 100644 --- a/lib/register/instructions/function_return.rb +++ b/lib/register/instructions/function_return.rb @@ -11,7 +11,7 @@ module Register attr_reader :register , :index def to_s - "FunctionReturn(#{register}: #{index})" + "FunctionReturn: #{register} [#{index}]" end end diff --git a/lib/register/instructions/get_slot.rb b/lib/register/instructions/get_slot.rb index 0c4c0cd4..5e7b5cf9 100644 --- a/lib/register/instructions/get_slot.rb +++ b/lib/register/instructions/get_slot.rb @@ -29,7 +29,7 @@ module Register attr_accessor :register , :array , :index def to_s - "GetSlot(#{register}: #{array}[#{index}])" + "GetSlot: #{register} -> #{array} [#{index}]" end end diff --git a/lib/register/instructions/load_constant.rb b/lib/register/instructions/load_constant.rb index 708b1ade..00f52b97 100644 --- a/lib/register/instructions/load_constant.rb +++ b/lib/register/instructions/load_constant.rb @@ -12,7 +12,7 @@ module Register attr_accessor :register , :constant def to_s - "LoadConstant(#{register}: #{constant})" + "LoadConstant: #{register} <- #{constant}" end end diff --git a/lib/register/instructions/register_transfer.rb b/lib/register/instructions/register_transfer.rb index 7b7362df..91945fde 100644 --- a/lib/register/instructions/register_transfer.rb +++ b/lib/register/instructions/register_transfer.rb @@ -23,7 +23,7 @@ module Register attr_reader :from, :to def to_s - "RegisterTransfer(#{from} -> #{to})" + "RegisterTransfer: #{from} -> #{to}" end end diff --git a/lib/register/instructions/save_return.rb b/lib/register/instructions/save_return.rb index a4faffa3..910346b8 100644 --- a/lib/register/instructions/save_return.rb +++ b/lib/register/instructions/save_return.rb @@ -14,7 +14,7 @@ module Register attr_reader :register , :index def to_s - "SaveReturn(#{register}[#{index}])" + "SaveReturn: #{register} [#{index}]" end end diff --git a/lib/register/instructions/set_slot.rb b/lib/register/instructions/set_slot.rb index b0e04e0b..926fc562 100644 --- a/lib/register/instructions/set_slot.rb +++ b/lib/register/instructions/set_slot.rb @@ -27,7 +27,7 @@ module Register end attr_accessor :register , :array , :index def to_s - "SetSlot(#{register}: #{array}[#{index}])" + "SetSlot: #{register} -> #{array} [#{index}]" end end diff --git a/lib/register/instructions/syscall.rb b/lib/register/instructions/syscall.rb index 1da3f038..a96f83be 100644 --- a/lib/register/instructions/syscall.rb +++ b/lib/register/instructions/syscall.rb @@ -15,7 +15,7 @@ module Register attr_reader :name def to_s - "Syscall(#{name})" + "Syscall: #{name}" end end diff --git a/lib/virtual/machine.rb b/lib/virtual/machine.rb index 873d7ad5..51c0ce0d 100644 --- a/lib/virtual/machine.rb +++ b/lib/virtual/machine.rb @@ -62,7 +62,7 @@ module Virtual end end @passes.each do |pass_class| - puts "running #{pass_class}" + #puts "running #{pass_class}" run_blocks_for pass_class return if stop_at == pass_class end @@ -75,7 +75,7 @@ module Virtual run = false @passes.each do |pass_class| if run - puts "running #{pass_class}" + #puts "running #{pass_class}" run_blocks_for pass_class else run = true if start_at == pass_class