fix statements

as they go
This commit is contained in:
Torsten Ruger 2015-11-02 20:12:01 +02:00
parent 7eebc775d6
commit 03979156db
6 changed files with 52 additions and 51 deletions

View File

@ -16,7 +16,7 @@ int main()
end end
end end
HERE HERE
@expect = [Label, SaveReturn,LoadConstant,LoadConstant,OperatorInstruction,GetSlot,SetSlot, @expect = [Label, LoadConstant,LoadConstant,OperatorInstruction,GetSlot,SetSlot,
Label,RegisterTransfer,GetSlot,FunctionReturn] Label,RegisterTransfer,GetSlot,FunctionReturn]
check check
end end
@ -30,7 +30,7 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,LoadConstant,GetSlot,SetSlot ,Label,RegisterTransfer,GetSlot,FunctionReturn] @expect = [Label, LoadConstant,GetSlot,SetSlot ,Label,RegisterTransfer,GetSlot,FunctionReturn]
check check
end end
@ -42,7 +42,7 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,LoadConstant, GetSlot,SetSlot ,Label,RegisterTransfer,GetSlot,FunctionReturn] @expect = [Label, LoadConstant, GetSlot,SetSlot ,Label,RegisterTransfer,GetSlot,FunctionReturn]
check check
end end
@ -54,9 +54,9 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,GetSlot,GetSlot,SetSlot, LoadConstant,SetSlot, @expect = [Label, GetSlot, GetSlot, SetSlot, LoadConstant, SetSlot, LoadConstant ,
LoadConstant,SetSlot,RegisterTransfer,FunctionCall,GetSlot,GetSlot,SetSlot , SetSlot, LoadConstant, SetSlot, RegisterTransfer, FunctionCall, GetSlot, GetSlot ,
Label,RegisterTransfer,GetSlot,FunctionReturn] SetSlot, Label, RegisterTransfer, GetSlot, FunctionReturn]
check check
end end
@ -69,10 +69,10 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,LoadConstant,GetSlot,SetSlot,GetSlot,GetSlot ,SetSlot, @expect = [Label, LoadConstant,GetSlot,SetSlot,GetSlot,GetSlot ,SetSlot,
Label,RegisterTransfer,GetSlot,FunctionReturn] Label,RegisterTransfer,GetSlot,FunctionReturn]
was = check was = check
get = was.next(6) get = was.next(5)
assert_equal GetSlot , get.class assert_equal GetSlot , get.class
assert_equal 4, get.index , "Get to frame index must be offset, not #{get.index}" assert_equal 4, get.index , "Get to frame index must be offset, not #{get.index}"
end end
@ -86,9 +86,9 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,LoadConstant,SetSlot ,Label,RegisterTransfer,GetSlot,FunctionReturn] @expect = [Label, LoadConstant,SetSlot ,Label,RegisterTransfer,GetSlot,FunctionReturn]
was = check was = check
set = was.next(3) set = was.next(2)
assert_equal SetSlot , set.class assert_equal SetSlot , set.class
assert_equal 10, set.index , "Set to args index must be offset, not #{set.index}" assert_equal 10, set.index , "Set to args index must be offset, not #{set.index}"
end end
@ -101,9 +101,9 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,LoadConstant,GetSlot,SetSlot ,Label,RegisterTransfer,GetSlot,FunctionReturn] @expect = [Label, LoadConstant,GetSlot,SetSlot ,Label,RegisterTransfer,GetSlot,FunctionReturn]
was = check was = check
set = was.next(4) set = was.next(3)
assert_equal SetSlot , set.class assert_equal SetSlot , set.class
assert_equal 4, set.index , "Set to frame index must be offset, not #{set.index}" assert_equal 4, set.index , "Set to frame index must be offset, not #{set.index}"
end end
@ -118,9 +118,9 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,GetSlot , SetSlot,Label , RegisterTransfer,GetSlot,FunctionReturn] @expect = [Label, GetSlot , SetSlot,Label , RegisterTransfer,GetSlot,FunctionReturn]
was = check was = check
get = was.next(2) get = was.next(1)
assert_equal GetSlot , get.class assert_equal GetSlot , get.class
assert_equal 10, get.index , "Get to frame index must be offset, not #{get.index}" assert_equal 10, get.index , "Get to frame index must be offset, not #{get.index}"
end end

View File

@ -17,9 +17,9 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,GetSlot,LoadConstant, @expect = [Label, GetSlot, LoadConstant, SetSlot, LoadConstant, SetSlot, LoadConstant ,
SetSlot,LoadConstant,SetSlot,LoadConstant,SetSlot,RegisterTransfer,FunctionCall,GetSlot , SetSlot, LoadConstant, SetSlot, RegisterTransfer, FunctionCall, GetSlot, Label ,
Label,RegisterTransfer,GetSlot,FunctionReturn] RegisterTransfer, GetSlot, FunctionReturn]
check check
end end
@ -37,9 +37,9 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,GetSlot,LoadConstant, @expect = [Label, GetSlot, LoadConstant, SetSlot, LoadConstant, SetSlot, LoadConstant ,
SetSlot,LoadConstant,SetSlot,LoadConstant,SetSlot,RegisterTransfer,FunctionCall,GetSlot , SetSlot, LoadConstant, SetSlot, RegisterTransfer, FunctionCall, GetSlot, Label ,
Label,RegisterTransfer,GetSlot,FunctionReturn] RegisterTransfer, GetSlot, FunctionReturn]
check check
end end
@ -57,9 +57,9 @@ class Object
end end
end end
HERE HERE
@expect = [ Label, SaveReturn,LoadConstant,GetSlot,SetSlot,GetSlot, @expect = [Label, LoadConstant, GetSlot, SetSlot, GetSlot, GetSlot, GetSlot ,
GetSlot,GetSlot,SetSlot,LoadConstant,SetSlot,LoadConstant,SetSlot,RegisterTransfer,FunctionCall, SetSlot, LoadConstant, SetSlot, LoadConstant, SetSlot, LoadConstant, SetSlot ,
GetSlot ,Label,RegisterTransfer,GetSlot,FunctionReturn] RegisterTransfer, FunctionCall, GetSlot, Label, RegisterTransfer, GetSlot, FunctionReturn]
check check
end end
@ -77,9 +77,9 @@ class Object
end end
end end
HERE HERE
@expect = [ Label, SaveReturn,GetSlot,GetSlot,GetSlot,SetSlot, @expect = [Label, GetSlot, GetSlot, GetSlot, SetSlot, LoadConstant, SetSlot ,
LoadConstant,SetSlot,LoadConstant,SetSlot,RegisterTransfer,FunctionCall, LoadConstant, SetSlot, LoadConstant, SetSlot, RegisterTransfer, FunctionCall, GetSlot ,
GetSlot ,Label,RegisterTransfer,GetSlot,FunctionReturn] Label, RegisterTransfer, GetSlot, FunctionReturn]
check check
end end
@ -94,11 +94,11 @@ int main()
end end
end end
HERE HERE
@expect = [ Label, SaveReturn , GetSlot,GetSlot,SetSlot,LoadConstant,SetSlot,LoadConstant, @expect = [Label, GetSlot, GetSlot, SetSlot, LoadConstant, SetSlot, LoadConstant ,
SetSlot,LoadConstant,SetSlot,RegisterTransfer,FunctionCall,GetSlot, SetSlot, LoadConstant, SetSlot, LoadConstant, SetSlot, RegisterTransfer, FunctionCall ,
Label,RegisterTransfer,GetSlot,FunctionReturn] GetSlot, Label, RegisterTransfer, GetSlot, FunctionReturn]
was = check was = check
set = was.next(8) set = was.next(7)
assert_equal SetSlot , set.class assert_equal SetSlot , set.class
assert_equal 9, set.index , "Set to message must be offset, not #{set.index}" assert_equal 9, set.index , "Set to message must be offset, not #{set.index}"
end end

View File

@ -17,7 +17,7 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,LoadConstant,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn] @expect = [Label, LoadConstant,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
check check
end end
@ -34,8 +34,9 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,GetSlot,LoadConstant,SetSlot,LoadConstant,SetSlot,LoadConstant,SetSlot, @expect = [Label, GetSlot, LoadConstant, SetSlot, LoadConstant, SetSlot, LoadConstant ,
RegisterTransfer,FunctionCall,GetSlot,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn] SetSlot, LoadConstant, SetSlot, RegisterTransfer, FunctionCall, GetSlot, SetSlot ,
Label, RegisterTransfer, GetSlot, FunctionReturn]
check check
end end
@ -48,7 +49,7 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,LoadConstant,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn] @expect = [Label, LoadConstant,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
assert_raises{check} assert_raises{check}
end end
@ -61,7 +62,7 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,GetSlot,GetSlot,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn] @expect = [Label, GetSlot,GetSlot,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
check check
end end
end end

View File

@ -16,7 +16,7 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,LoadConstant,LoadConstant, OperatorInstruction,IsPlus , @expect = [Label, LoadConstant,LoadConstant, OperatorInstruction,IsPlus ,
LoadConstant,SetSlot,Branch , Label , LoadConstant ,SetSlot, LoadConstant,SetSlot,Branch , Label , LoadConstant ,SetSlot,
Label,Label,RegisterTransfer,GetSlot,FunctionReturn] Label,Label,RegisterTransfer,GetSlot,FunctionReturn]
check check
@ -33,7 +33,7 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,LoadConstant,LoadConstant, OperatorInstruction,IsMinus , @expect = [Label,LoadConstant,LoadConstant, OperatorInstruction,IsMinus ,
Branch ,Label , LoadConstant ,SetSlot, Branch ,Label , LoadConstant ,SetSlot,
Label,Label , RegisterTransfer,GetSlot,FunctionReturn] Label,Label , RegisterTransfer,GetSlot,FunctionReturn]
check check
@ -50,7 +50,7 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,LoadConstant,LoadConstant,OperatorInstruction,IsZero , @expect = [Label, LoadConstant,LoadConstant,OperatorInstruction,IsZero ,
Branch , Label , LoadConstant ,SetSlot, Branch , Label , LoadConstant ,SetSlot,
Label,Label, RegisterTransfer,GetSlot,FunctionReturn] Label,Label, RegisterTransfer,GetSlot,FunctionReturn]
check check

View File

@ -13,9 +13,9 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,LoadConstant ,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn] @expect = [Label, LoadConstant ,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
was = check was = check
set = was.next(3) set = was.next(2)
assert_equal SetSlot , set.class assert_equal SetSlot , set.class
should = Register.machine.space.first_message.get_layout.variable_index(:return_value) should = Register.machine.space.first_message.get_layout.variable_index(:return_value)
assert_equal should, set.index , "Set to message must got to return_value(#{should}), not #{set.index}" assert_equal should, set.index , "Set to message must got to return_value(#{should}), not #{set.index}"
@ -30,7 +30,7 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,GetSlot,GetSlot ,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn] @expect = [Label, GetSlot,GetSlot ,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
check check
end end
@ -43,7 +43,7 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,LoadConstant,GetSlot,SetSlot,GetSlot,GetSlot ,SetSlot, @expect = [Label, LoadConstant,GetSlot,SetSlot,GetSlot,GetSlot ,SetSlot,
Label,RegisterTransfer,GetSlot,FunctionReturn] Label,RegisterTransfer,GetSlot,FunctionReturn]
check check
end end
@ -57,7 +57,7 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,GetSlot,GetSlot ,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn] @expect = [Label, GetSlot,GetSlot ,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
check check
end end
@ -69,9 +69,9 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,GetSlot,GetSlot,SetSlot, LoadConstant, @expect = [Label, GetSlot, GetSlot, SetSlot, LoadConstant, SetSlot, LoadConstant ,
SetSlot,LoadConstant,SetSlot,RegisterTransfer,FunctionCall,GetSlot ,SetSlot,Label, SetSlot, LoadConstant, SetSlot, RegisterTransfer, FunctionCall, GetSlot, SetSlot ,
RegisterTransfer,GetSlot,FunctionReturn] Label, RegisterTransfer, GetSlot, FunctionReturn]
check check
end end
end end

View File

@ -15,7 +15,7 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,Label,LoadConstant,IsPlus,LoadConstant,SetSlot,Branch, @expect = [Label, Label,LoadConstant,IsPlus,LoadConstant,SetSlot,Branch,
Label,Label,RegisterTransfer,GetSlot,FunctionReturn] Label,Label,RegisterTransfer,GetSlot,FunctionReturn]
check check
end end
@ -32,7 +32,7 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,LoadConstant,GetSlot,SetSlot,Label,GetSlot,GetSlot, IsPlus,GetSlot, @expect = [Label, LoadConstant,GetSlot,SetSlot,Label,GetSlot,GetSlot, IsPlus,GetSlot,
GetSlot,LoadConstant,OperatorInstruction,GetSlot,SetSlot,Branch, GetSlot,LoadConstant,OperatorInstruction,GetSlot,SetSlot,Branch,
Label,GetSlot,GetSlot,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn] Label,GetSlot,GetSlot,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
check check
@ -51,7 +51,7 @@ class Object
end end
end end
HERE HERE
@expect = [Label, SaveReturn,LoadConstant,GetSlot,SetSlot,Label, @expect = [Label, LoadConstant,GetSlot,SetSlot,Label,
GetSlot,GetSlot,LoadConstant,OperatorInstruction,IsPlus, GetSlot,GetSlot,LoadConstant,OperatorInstruction,IsPlus,
GetSlot, GetSlot,LoadConstant,OperatorInstruction, GetSlot, GetSlot, GetSlot,LoadConstant,OperatorInstruction, GetSlot,
SetSlot,GetSlot, GetSlot,SetSlot,Branch , Label , SetSlot,GetSlot, GetSlot,SetSlot,Branch , Label ,