diff --git a/lib/virtual/machine.rb b/lib/virtual/machine.rb index 7b9b6551..f6c7018c 100644 --- a/lib/virtual/machine.rb +++ b/lib/virtual/machine.rb @@ -36,7 +36,7 @@ module Virtual class Machine - FIRST_PASS = "Virtual::SendImplementation" + FIRST_PASS = "Virtual::GetImplementation" LAST_PASS = "Virtual::SetOptimisation" def initialize diff --git a/lib/virtual/passes/get_implementation.rb b/lib/virtual/passes/get_implementation.rb index 4fe97835..b53d8e95 100644 --- a/lib/virtual/passes/get_implementation.rb +++ b/lib/virtual/passes/get_implementation.rb @@ -13,5 +13,4 @@ module Virtual end end end - Virtual.machine.add_pass "Virtual::GetImplementation" end diff --git a/test/compiler/test_methods.rb b/test/compiler/test_methods.rb index d4aa2235..9a283225 100644 --- a/test/compiler/test_methods.rb +++ b/test/compiler/test_methods.rb @@ -44,7 +44,7 @@ int foo() end foo() HERE - @output = [[Virtual::MethodEnter , Virtual::NewMessage, Virtual::Set, Virtual::Set, Virtual::MessageSend], + @output = [[Virtual::MethodEnter , Virtual::NewMessage, Virtual::Set, Virtual::Set, Virtual::MethodCall], [Virtual::MethodReturn]] check end diff --git a/test/fragments/test_foo.rb b/test/fragments/test_foo.rb index e8e921bc..84180d01 100644 --- a/test/fragments/test_foo.rb +++ b/test/fragments/test_foo.rb @@ -9,7 +9,7 @@ int foo(int x) int a = 5 return a end -3.foo( 4 ) +foo( 4 ) HERE @expect = [ Virtual::Return ] check diff --git a/test/interpreter/test_puts.rb b/test/interpreter/test_puts.rb index 29858b9d..8b2320d4 100644 --- a/test/interpreter/test_puts.rb +++ b/test/interpreter/test_puts.rb @@ -64,6 +64,7 @@ class TestPuts < MiniTest::Test "GetSlot" , "RegisterTransfer" ,"GetSlot" , "GetSlot","GetSlot", "FunctionReturn" , "RegisterTransfer" , "Syscall" , "NilClass"].each_with_index do |name , index| got = ticks(1) + #puts "TICK #{index}" assert got.class.name.index(name) , "Wrong class for #{index+1}, expect #{name} , got #{got}" end end