fix type in call issue

This commit is contained in:
Torsten Ruger
2015-10-06 15:26:57 +03:00
parent f4a4ccb98e
commit 4e26166dff
7 changed files with 40 additions and 19 deletions

View File

@ -42,13 +42,16 @@ HERE
@interpreter = Interpreter::Interpreter.new
@interpreter.start Virtual.machine.init
# done = ticks(34)
["Branch" , "LoadConstant" , "GetSlot" , "SetSlot" , "RegisterTransfer" ,
"GetSlot" , "FunctionCall" , "SaveReturn" , "RegisterTransfer" , "GetSlot" ,
"GetSlot" , "GetSlot" , "SetSlot" , "LoadConstant" , "SetSlot" ,
"LoadConstant" , "SetSlot" , "RegisterTransfer" , "GetSlot" , "FunctionCall" ,
"SaveReturn" , "GetSlot", "OperatorInstruction" , "RegisterTransfer" , "GetSlot" , "GetSlot" ,
"GetSlot" , "FunctionReturn" ,"RegisterTransfer" , "Syscall", "NilClass"].each_with_index do |name , index|
return if index == 11
["Branch" , "LoadConstant" , "GetSlot" , "SetSlot" , "RegisterTransfer" ,
"GetSlot" , "FunctionCall" , "SaveReturn", "LoadConstant" , "SetSlot" ,
"GetSlot" , "GetSlot" , "SetSlot" , "LoadConstant" , "SetSlot" ,
"RegisterTransfer" ,"GetSlot" , "FunctionCall" ,"SaveReturn" , "GetSlot" ,
"LoadConstant", "SetSlot", "GetSlot" , "GetSlot" , "SetSlot" ,
"LoadConstant", "SetSlot" , "GetSlot" , "SetSlot" , "RegisterTransfer",
"GetSlot", "FunctionCall", "SaveReturn", "GetSlot", "GetSlot",
"SetSlot", "GetSlot", "SetSlot", "FunctionCall", "FunctionCall",
"FunctionCall", "FunctionCall", "FunctionCall", "FunctionCall", "FunctionCall",
"NilClass"].each_with_index do |name , index|
got = ticks(1)
puts got
assert got.class.name.index(name) , "Wrong class for #{index+1}, expect #{name} , got #{got}"