fix return statement to actually return

fix a million tests
This commit is contained in:
Torsten Ruger
2015-10-27 21:04:46 +02:00
parent 79cf59c4e2
commit 142c36a374
16 changed files with 61 additions and 59 deletions

View File

@@ -32,17 +32,18 @@ HERE
@interpreter.start Register.machine.init
#show_ticks # get output of what is
["Branch","Label","LoadConstant","GetSlot","SetSlot",
"RegisterTransfer","FunctionCall","Label","SaveReturn","GetSlot",
"GetSlot","SetSlot","LoadConstant","SetSlot","LoadConstant",
"SetSlot","RegisterTransfer","FunctionCall","Label","SaveReturn",
"GetSlot","LoadConstant","OperatorInstruction","IsZero","GetSlot",
"LoadConstant","SetSlot","LoadConstant","SetSlot","RegisterTransfer",
"FunctionCall","Label","SaveReturn","GetSlot","RegisterTransfer",
"Syscall","RegisterTransfer","RegisterTransfer","SetSlot","Label",
"RegisterTransfer","GetSlot","FunctionReturn","GetSlot","Branch",
"Label","Label","RegisterTransfer","GetSlot","FunctionReturn",
"GetSlot","Label","RegisterTransfer","GetSlot","FunctionReturn",
"RegisterTransfer","Syscall","NilClass"].each_with_index do |name , index|
"RegisterTransfer","FunctionCall","Label","SaveReturn","GetSlot",
"GetSlot","SetSlot","LoadConstant","SetSlot","LoadConstant",
"SetSlot","LoadConstant","SetSlot","RegisterTransfer","FunctionCall",
"Label","SaveReturn","GetSlot","LoadConstant","OperatorInstruction",
"IsZero","GetSlot","LoadConstant","SetSlot","LoadConstant",
"SetSlot","LoadConstant","SetSlot","RegisterTransfer","FunctionCall",
"Label","SaveReturn","GetSlot","RegisterTransfer","Syscall",
"RegisterTransfer","RegisterTransfer","SetSlot","Label","RegisterTransfer",
"GetSlot","FunctionReturn","GetSlot","Branch","Label",
"Label","RegisterTransfer","GetSlot","FunctionReturn","GetSlot",
"Label","RegisterTransfer","GetSlot","FunctionReturn","RegisterTransfer",
"Syscall","NilClass"].each_with_index do |name , index|
got = ticks(1)
assert got.class.name.index(name) , "Wrong class for #{index+1}, expect #{name} , got #{got}"
end