removed blocks and moved to labels
somewhat easier to understand the code as a linked list relatively painless change, considering
This commit is contained in:
@ -59,26 +59,30 @@ HERE
|
||||
@interpreter = Interpreter::Interpreter.new
|
||||
@interpreter.start Register.machine.init
|
||||
#show_ticks # get output of what is
|
||||
["Branch","LoadConstant","GetSlot","SetSlot","RegisterTransfer",
|
||||
"FunctionCall","SaveReturn","GetSlot","LoadConstant","SetSlot",
|
||||
"LoadConstant","SetSlot","RegisterTransfer","FunctionCall","SaveReturn",
|
||||
"LoadConstant","GetSlot","SetSlot","GetSlot","GetSlot",
|
||||
["Branch","Label","LoadConstant","GetSlot","SetSlot",
|
||||
"RegisterTransfer","FunctionCall","Label","SaveReturn","GetSlot",
|
||||
"LoadConstant","SetSlot","LoadConstant","SetSlot","RegisterTransfer",
|
||||
"FunctionCall","Label","SaveReturn","LoadConstant","GetSlot",
|
||||
"SetSlot","GetSlot","GetSlot","SetSlot","LoadConstant",
|
||||
"SetSlot","GetSlot","GetSlot","SetSlot","RegisterTransfer",
|
||||
"FunctionCall","Label","SaveReturn","GetSlot","LoadConstant",
|
||||
"OperatorInstruction","GetSlot","SetSlot","GetSlot","GetSlot",
|
||||
"GetSlot","OperatorInstruction","GetSlot","SetSlot","GetSlot",
|
||||
"GetSlot","IsNotzero","Label","GetSlot","GetSlot",
|
||||
"SetSlot","LoadConstant","SetSlot","GetSlot","GetSlot",
|
||||
"SetSlot","RegisterTransfer","FunctionCall","SaveReturn","GetSlot",
|
||||
"LoadConstant","OperatorInstruction","GetSlot","SetSlot","GetSlot",
|
||||
"GetSlot","GetSlot","OperatorInstruction","GetSlot","SetSlot",
|
||||
"GetSlot","GetSlot","IsNotzero","GetSlot","GetSlot",
|
||||
"SetSlot","LoadConstant","SetSlot","GetSlot","GetSlot",
|
||||
"SetSlot","RegisterTransfer","FunctionCall","SaveReturn","GetSlot",
|
||||
"LoadConstant","OperatorInstruction","IsZero","Branch","GetSlot",
|
||||
"LoadConstant","OperatorInstruction","IsZero","LoadConstant","GetSlot",
|
||||
"LoadConstant","OperatorInstruction","IsZero","LoadConstant","GetSlot",
|
||||
"LoadConstant","OperatorInstruction","IsZero","LoadConstant","GetSlot",
|
||||
"LoadConstant","OperatorInstruction","IsZero","LoadConstant","RegisterTransfer",
|
||||
"GetSlot","FunctionReturn","GetSlot","GetSlot","SetSlot",
|
||||
"GetSlot","GetSlot","GetSlot","OperatorInstruction","SetSlot",
|
||||
"GetSlot","RegisterTransfer","GetSlot","FunctionReturn","GetSlot",
|
||||
"RegisterTransfer","GetSlot","FunctionReturn","GetSlot","RegisterTransfer",
|
||||
"SetSlot","RegisterTransfer","FunctionCall","Label","SaveReturn",
|
||||
"GetSlot","LoadConstant","OperatorInstruction","IsZero","Branch",
|
||||
"Label","GetSlot","LoadConstant","OperatorInstruction","IsZero",
|
||||
"Label","LoadConstant","Label","GetSlot","LoadConstant",
|
||||
"OperatorInstruction","IsZero","Label","LoadConstant","Label",
|
||||
"GetSlot","LoadConstant","OperatorInstruction","IsZero","Label",
|
||||
"LoadConstant","Label","GetSlot","LoadConstant","OperatorInstruction",
|
||||
"IsZero","Label","LoadConstant","Label","Label",
|
||||
"RegisterTransfer","GetSlot","FunctionReturn","GetSlot","GetSlot",
|
||||
"SetSlot","GetSlot","GetSlot","GetSlot","OperatorInstruction",
|
||||
"SetSlot","Label","GetSlot","Label","RegisterTransfer",
|
||||
"GetSlot","FunctionReturn","GetSlot","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}"
|
||||
|
Reference in New Issue
Block a user