change return sequence to return messages to space
as it was before blocks (thought blocks would make reuse of messages impossible, but was wrong, this only appilies to lambdas) (too) many tests affected
This commit is contained in:
@ -13,9 +13,10 @@ module Risc
|
||||
#show_main_ticks # get output of what is in main
|
||||
check_main_chain [LoadConstant, LoadConstant, OperatorInstruction, IsZero, LoadConstant,
|
||||
OperatorInstruction, IsZero, LoadConstant, RegToSlot, Branch,
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
SlotToReg, FunctionReturn, Transfer, SlotToReg, SlotToReg,
|
||||
Branch, Syscall, NilClass]
|
||||
SlotToReg, SlotToReg, RegToSlot, LoadConstant, SlotToReg,
|
||||
RegToSlot, RegToSlot, SlotToReg, SlotToReg, SlotToReg,
|
||||
FunctionReturn, Transfer, SlotToReg, SlotToReg, Branch,
|
||||
Syscall, NilClass]
|
||||
assert_equal 1 , get_return
|
||||
end
|
||||
def test_load_10
|
||||
@ -39,7 +40,7 @@ module Risc
|
||||
assert check.label.name.start_with?("false_label") , check.label.name
|
||||
end
|
||||
def test_exit
|
||||
done = main_ticks(22)
|
||||
done = main_ticks(26)
|
||||
assert_equal Syscall , done.class
|
||||
end
|
||||
end
|
||||
|
@ -10,26 +10,8 @@ module Risc
|
||||
end
|
||||
|
||||
def test_if
|
||||
#show_main_ticks # get output of what is in main
|
||||
check_main_chain [LoadConstant, LoadConstant, SlotToReg, RegToSlot, RegToSlot,
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
RegToSlot, RegToSlot, SlotToReg, Branch, RegToSlot,
|
||||
LoadConstant, SlotToReg, RegToSlot, LoadConstant, SlotToReg,
|
||||
SlotToReg, RegToSlot, LoadConstant, SlotToReg, RegToSlot,
|
||||
SlotToReg, FunctionCall, SlotToReg, SlotToReg, SlotToReg,
|
||||
SlotToReg, SlotToReg, OperatorInstruction, IsMinus, IsZero,
|
||||
LoadConstant, RegToSlot, SlotToReg, Branch, SlotToReg,
|
||||
RegToSlot, SlotToReg, SlotToReg, SlotToReg, FunctionReturn,
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
LoadConstant, OperatorInstruction, IsZero, LoadConstant, RegToSlot,
|
||||
Branch, SlotToReg, SlotToReg, RegToSlot, SlotToReg,
|
||||
SlotToReg, SlotToReg, FunctionReturn, Transfer, SlotToReg,
|
||||
SlotToReg, Branch, Syscall, NilClass]
|
||||
run_all
|
||||
assert_equal 2 , get_return
|
||||
end
|
||||
def test_exit
|
||||
done = main_ticks(68)
|
||||
assert_equal Syscall , done.class
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -10,27 +10,8 @@ module Risc
|
||||
end
|
||||
|
||||
def test_if
|
||||
#show_main_ticks # get output of what is in main
|
||||
check_main_chain [LoadConstant, LoadConstant, SlotToReg, RegToSlot, RegToSlot,
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
RegToSlot, RegToSlot, SlotToReg, Branch, RegToSlot,
|
||||
LoadConstant, SlotToReg, RegToSlot, LoadConstant, SlotToReg,
|
||||
SlotToReg, RegToSlot, LoadConstant, SlotToReg, RegToSlot,
|
||||
SlotToReg, FunctionCall, SlotToReg, SlotToReg, SlotToReg,
|
||||
SlotToReg, SlotToReg, OperatorInstruction, IsMinus, LoadConstant,
|
||||
Branch, RegToSlot, SlotToReg, SlotToReg, Branch,
|
||||
RegToSlot, SlotToReg, SlotToReg, SlotToReg, FunctionReturn,
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
LoadConstant, OperatorInstruction, IsZero, LoadConstant, OperatorInstruction,
|
||||
IsZero, LoadConstant, RegToSlot, Branch, Branch,
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
SlotToReg, FunctionReturn, Transfer, SlotToReg, SlotToReg,
|
||||
Branch, Syscall, NilClass]
|
||||
run_all
|
||||
assert_equal 1 , get_return
|
||||
end
|
||||
def test_exit
|
||||
done = main_ticks(72)
|
||||
assert_equal Syscall , done.class
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -10,26 +10,8 @@ module Risc
|
||||
end
|
||||
|
||||
def test_if
|
||||
#show_main_ticks # get output of what is in main
|
||||
check_main_chain [LoadConstant, LoadConstant, SlotToReg, RegToSlot, RegToSlot,
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
RegToSlot, RegToSlot, SlotToReg, Branch, RegToSlot,
|
||||
LoadConstant, SlotToReg, RegToSlot, LoadConstant, SlotToReg,
|
||||
SlotToReg, RegToSlot, LoadConstant, SlotToReg, RegToSlot,
|
||||
SlotToReg, FunctionCall, SlotToReg, SlotToReg, SlotToReg,
|
||||
SlotToReg, SlotToReg, OperatorInstruction, IsMinus, IsZero,
|
||||
LoadConstant, RegToSlot, SlotToReg, Branch, SlotToReg,
|
||||
RegToSlot, SlotToReg, SlotToReg, SlotToReg, FunctionReturn,
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
LoadConstant, OperatorInstruction, IsZero, LoadConstant, RegToSlot,
|
||||
Branch, SlotToReg, SlotToReg, RegToSlot, SlotToReg,
|
||||
SlotToReg, SlotToReg, FunctionReturn, Transfer, SlotToReg,
|
||||
SlotToReg, Branch, Syscall, NilClass]
|
||||
run_all
|
||||
assert_equal 2 , get_return
|
||||
end
|
||||
def test_exit
|
||||
done = main_ticks(68)
|
||||
assert_equal Syscall , done.class
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -10,27 +10,8 @@ module Risc
|
||||
end
|
||||
|
||||
def test_if
|
||||
#show_main_ticks # get output of what is in main
|
||||
check_main_chain [LoadConstant, LoadConstant, SlotToReg, RegToSlot, RegToSlot,
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
RegToSlot, RegToSlot, SlotToReg, Branch, RegToSlot,
|
||||
LoadConstant, SlotToReg, RegToSlot, LoadConstant, SlotToReg,
|
||||
SlotToReg, RegToSlot, LoadConstant, SlotToReg, RegToSlot,
|
||||
SlotToReg, FunctionCall, SlotToReg, SlotToReg, SlotToReg,
|
||||
SlotToReg, SlotToReg, OperatorInstruction, IsMinus, LoadConstant,
|
||||
Branch, RegToSlot, SlotToReg, SlotToReg, Branch,
|
||||
RegToSlot, SlotToReg, SlotToReg, SlotToReg, FunctionReturn,
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
LoadConstant, OperatorInstruction, IsZero, LoadConstant, OperatorInstruction,
|
||||
IsZero, LoadConstant, RegToSlot, Branch, Branch,
|
||||
SlotToReg, SlotToReg, RegToSlot, SlotToReg, SlotToReg,
|
||||
SlotToReg, FunctionReturn, Transfer, SlotToReg, SlotToReg,
|
||||
Branch, Syscall, NilClass]
|
||||
run_all
|
||||
assert_equal 1 , get_return
|
||||
end
|
||||
def test_exit
|
||||
done = main_ticks(72)
|
||||
assert_equal Syscall , done.class
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user