removing unconditional

just Branch is fine
This commit is contained in:
Torsten Ruger
2018-04-02 19:30:34 +03:00
parent 299a130761
commit 65d57c8c7c
4 changed files with 6 additions and 10 deletions

View File

@ -9,7 +9,7 @@ module Risc
@input = "if(@a) ; arg = 5 ; else; arg = 6; end"
@expect = [SlotToReg, SlotToReg, LoadConstant, OperatorInstruction, IsNotZero ,
LoadConstant, OperatorInstruction, IsNotZero, Label, LoadConstant ,
SlotToReg, RegToSlot, Unconditional, Label, LoadConstant ,
SlotToReg, RegToSlot, Branch, Label, LoadConstant ,
SlotToReg, RegToSlot, Label]
end

View File

@ -9,7 +9,7 @@ module Risc
@input = "while(@a) ; arg = 5 end"
@expect = [Label, SlotToReg, SlotToReg, LoadConstant, OperatorInstruction ,
IsNotZero, LoadConstant, OperatorInstruction, IsNotZero, LoadConstant ,
SlotToReg, RegToSlot, Unconditional, Label]
SlotToReg, RegToSlot, Branch, Label]
end
def test_while_instructions