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:
Torsten Ruger
2015-10-23 21:27:36 +03:00
parent f1f56f0d4e
commit 57f37ec023
22 changed files with 281 additions and 370 deletions

View File

@ -15,8 +15,8 @@ class Object
end
end
HERE
@expect = [[SaveReturn],[LoadConstant,IsPlus,LoadConstant,Branch],
[],[RegisterTransfer,GetSlot,FunctionReturn]]
@expect = [Label, SaveReturn,Label,LoadConstant,IsPlus,LoadConstant,Branch,
Label,Label,RegisterTransfer,GetSlot,FunctionReturn]
check
end
@ -28,12 +28,13 @@ class Object
while_plus(n)
n = n - 1
end
return n
end
end
HERE
@expect = [[SaveReturn,LoadConstant,GetSlot,SetSlot],[GetSlot,GetSlot, IsPlus,GetSlot,
GetSlot,LoadConstant,OperatorInstruction,GetSlot,SetSlot,Branch],
[],[RegisterTransfer,GetSlot,FunctionReturn]]
@expect = [Label, SaveReturn,LoadConstant,GetSlot,SetSlot,Label,GetSlot,GetSlot, IsPlus,GetSlot,
GetSlot,LoadConstant,OperatorInstruction,GetSlot,SetSlot,Branch,
Label,GetSlot,GetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
check
end
@ -50,11 +51,11 @@ class Object
end
end
HERE
@expect = [[SaveReturn,LoadConstant,GetSlot,SetSlot],
[GetSlot,GetSlot,LoadConstant,OperatorInstruction,IsPlus,GetSlot,
GetSlot,LoadConstant,OperatorInstruction,GetSlot,SetSlot,GetSlot,
GetSlot,Branch] ,
[],[RegisterTransfer,GetSlot,FunctionReturn]]
@expect = [Label, SaveReturn,LoadConstant,GetSlot,SetSlot,Label,
GetSlot,GetSlot,LoadConstant,OperatorInstruction,IsPlus,
GetSlot, GetSlot,LoadConstant,OperatorInstruction, GetSlot,
SetSlot,GetSlot, GetSlot,Branch , Label ,
Label , RegisterTransfer,GetSlot,FunctionReturn]
check
end
end