rename also get_slot, to slot_to_reg
makes source and target clear
This commit is contained in:
@ -17,14 +17,14 @@ HERE
|
||||
|
||||
def test_chain
|
||||
#show_ticks # get output of what is
|
||||
check_chain ["Branch","Label","LoadConstant","GetSlot","RegToSlot",
|
||||
check_chain ["Branch","Label","LoadConstant","SlotToReg","RegToSlot",
|
||||
"LoadConstant","RegToSlot","FunctionCall","Label","LoadConstant",
|
||||
"LoadConstant","OperatorInstruction","RegToSlot","Label","FunctionReturn",
|
||||
"RegisterTransfer","Syscall","NilClass"]
|
||||
end
|
||||
|
||||
def test_get
|
||||
assert_equal Register::GetSlot , ticks(4).class
|
||||
assert_equal Register::SlotToReg , ticks(4).class
|
||||
assert @interpreter.get_register( :r2 )
|
||||
assert Integer , @interpreter.get_register( :r2 ).class
|
||||
end
|
||||
|
@ -36,7 +36,7 @@ class AddChange < MiniTest::Test
|
||||
|
||||
def test_chain
|
||||
#show_ticks # get output of what is
|
||||
check_chain ["Branch","Label","LoadConstant","GetSlot","RegToSlot",
|
||||
check_chain ["Branch","Label","LoadConstant","SlotToReg","RegToSlot",
|
||||
"LoadConstant","RegToSlot","FunctionCall","Label","LoadConstant",
|
||||
"LoadConstant","OperatorInstruction","RegToSlot","Label","FunctionReturn",
|
||||
"RegisterTransfer","Syscall","NilClass"]
|
||||
|
@ -20,13 +20,13 @@ HERE
|
||||
|
||||
def test_chain
|
||||
#show_ticks # get output of what is
|
||||
check_chain ["Branch","Label","LoadConstant","GetSlot","RegToSlot",
|
||||
"LoadConstant","RegToSlot","FunctionCall","Label","GetSlot",
|
||||
check_chain ["Branch","Label","LoadConstant","SlotToReg","RegToSlot",
|
||||
"LoadConstant","RegToSlot","FunctionCall","Label","SlotToReg",
|
||||
"LoadConstant","RegToSlot","LoadConstant","RegToSlot","LoadConstant",
|
||||
"RegToSlot","LoadConstant","RegToSlot","LoadConstant","RegToSlot",
|
||||
"LoadConstant","RegToSlot","RegisterTransfer","FunctionCall","Label",
|
||||
"GetSlot","GetSlot","GetSlot","SetByte","Label",
|
||||
"FunctionReturn","RegisterTransfer","GetSlot","GetSlot","Label",
|
||||
"SlotToReg","SlotToReg","SlotToReg","SetByte","Label",
|
||||
"FunctionReturn","RegisterTransfer","SlotToReg","SlotToReg","Label",
|
||||
"FunctionReturn","RegisterTransfer","Syscall","NilClass"]
|
||||
end
|
||||
|
||||
@ -42,7 +42,7 @@ HERE
|
||||
assert_equal :r2, @interpreter.instruction.array.symbol
|
||||
end
|
||||
def test_get
|
||||
assert_equal Register::GetSlot , ticks(4).class
|
||||
assert_equal Register::SlotToReg , ticks(4).class
|
||||
assert @interpreter.get_register( :r1 )
|
||||
assert Integer , @interpreter.get_register( :r1 ).class
|
||||
end
|
||||
|
@ -33,18 +33,18 @@ HERE
|
||||
end
|
||||
def test_if
|
||||
#show_ticks # get output of what is
|
||||
check_chain ["Branch","Label","LoadConstant","GetSlot","RegToSlot",
|
||||
"LoadConstant","RegToSlot","FunctionCall","Label","GetSlot",
|
||||
"GetSlot","RegToSlot","LoadConstant","RegToSlot","LoadConstant",
|
||||
check_chain ["Branch","Label","LoadConstant","SlotToReg","RegToSlot",
|
||||
"LoadConstant","RegToSlot","FunctionCall","Label","SlotToReg",
|
||||
"SlotToReg","RegToSlot","LoadConstant","RegToSlot","LoadConstant",
|
||||
"RegToSlot","LoadConstant","RegToSlot","LoadConstant","RegToSlot",
|
||||
"RegisterTransfer","FunctionCall","Label","GetSlot","LoadConstant",
|
||||
"OperatorInstruction","IsZero","GetSlot","LoadConstant","RegToSlot",
|
||||
"RegisterTransfer","FunctionCall","Label","SlotToReg","LoadConstant",
|
||||
"OperatorInstruction","IsZero","SlotToReg","LoadConstant","RegToSlot",
|
||||
"LoadConstant","RegToSlot","LoadConstant","RegToSlot","LoadConstant",
|
||||
"RegToSlot","RegisterTransfer","FunctionCall","Label","GetSlot",
|
||||
"GetSlot","RegisterTransfer","Syscall","RegisterTransfer","RegisterTransfer",
|
||||
"RegToSlot","Label","FunctionReturn","RegisterTransfer","GetSlot",
|
||||
"GetSlot","Branch","Label","Label","FunctionReturn",
|
||||
"RegisterTransfer","GetSlot","GetSlot","Label","FunctionReturn",
|
||||
"RegToSlot","RegisterTransfer","FunctionCall","Label","SlotToReg",
|
||||
"SlotToReg","RegisterTransfer","Syscall","RegisterTransfer","RegisterTransfer",
|
||||
"RegToSlot","Label","FunctionReturn","RegisterTransfer","SlotToReg",
|
||||
"SlotToReg","Branch","Label","Label","FunctionReturn",
|
||||
"RegisterTransfer","SlotToReg","SlotToReg","Label","FunctionReturn",
|
||||
"RegisterTransfer","Syscall","NilClass"]
|
||||
end
|
||||
end
|
||||
|
@ -19,7 +19,7 @@ HERE
|
||||
|
||||
def test_mult
|
||||
#show_ticks # get output of what is
|
||||
check_chain ["Branch","Label","LoadConstant","GetSlot","RegToSlot",
|
||||
check_chain ["Branch","Label","LoadConstant","SlotToReg","RegToSlot",
|
||||
"LoadConstant","RegToSlot","FunctionCall","Label","LoadConstant",
|
||||
"LoadConstant","OperatorInstruction","RegToSlot","Label","FunctionReturn",
|
||||
"RegisterTransfer","Syscall","NilClass"]
|
||||
|
@ -17,7 +17,7 @@ HERE
|
||||
|
||||
def test_add
|
||||
#show_ticks # get output of what is
|
||||
check_chain ["Branch","Label","LoadConstant","GetSlot","RegToSlot",
|
||||
check_chain ["Branch","Label","LoadConstant","SlotToReg","RegToSlot",
|
||||
"LoadConstant","RegToSlot","FunctionCall","Label","LoadConstant",
|
||||
"LoadConstant","OperatorInstruction","RegToSlot","Label","FunctionReturn",
|
||||
"RegisterTransfer","Syscall","NilClass"]
|
||||
|
@ -17,13 +17,13 @@ HERE
|
||||
|
||||
def test_chain
|
||||
#show_ticks # get output of what is
|
||||
check_chain ["Branch","Label","LoadConstant","GetSlot","RegToSlot",
|
||||
"LoadConstant","RegToSlot","FunctionCall","Label","GetSlot",
|
||||
check_chain ["Branch","Label","LoadConstant","SlotToReg","RegToSlot",
|
||||
"LoadConstant","RegToSlot","FunctionCall","Label","SlotToReg",
|
||||
"LoadConstant","RegToSlot","LoadConstant","RegToSlot","LoadConstant",
|
||||
"RegToSlot","LoadConstant","RegToSlot","RegisterTransfer","FunctionCall",
|
||||
"Label","GetSlot","GetSlot","RegisterTransfer","Syscall",
|
||||
"Label","SlotToReg","SlotToReg","RegisterTransfer","Syscall",
|
||||
"RegisterTransfer","RegisterTransfer","RegToSlot","Label","FunctionReturn",
|
||||
"RegisterTransfer","GetSlot","GetSlot","Label","FunctionReturn",
|
||||
"RegisterTransfer","SlotToReg","SlotToReg","Label","FunctionReturn",
|
||||
"RegisterTransfer","Syscall","NilClass"]
|
||||
end
|
||||
|
||||
@ -39,7 +39,7 @@ HERE
|
||||
assert_equal :r2, @interpreter.instruction.array.symbol
|
||||
end
|
||||
def test_get
|
||||
assert_equal Register::GetSlot , ticks(4).class
|
||||
assert_equal Register::SlotToReg , ticks(4).class
|
||||
assert @interpreter.get_register( :r1 )
|
||||
assert Integer , @interpreter.get_register( :r1 ).class
|
||||
end
|
||||
|
@ -20,13 +20,13 @@ HERE
|
||||
|
||||
def test_chain
|
||||
#show_ticks # get output of what is
|
||||
check_chain ["Branch","Label","LoadConstant","GetSlot","RegToSlot",
|
||||
"LoadConstant","RegToSlot","FunctionCall","Label","GetSlot",
|
||||
check_chain ["Branch","Label","LoadConstant","SlotToReg","RegToSlot",
|
||||
"LoadConstant","RegToSlot","FunctionCall","Label","SlotToReg",
|
||||
"LoadConstant","RegToSlot","LoadConstant","RegToSlot","LoadConstant",
|
||||
"RegToSlot","LoadConstant","RegToSlot","LoadConstant","RegToSlot",
|
||||
"RegisterTransfer","FunctionCall","Label","GetSlot","GetSlot",
|
||||
"RegisterTransfer","FunctionCall","Label","SlotToReg","SlotToReg",
|
||||
"GetByte","RegToSlot","Label","FunctionReturn","RegisterTransfer",
|
||||
"GetSlot","GetSlot","Label","FunctionReturn","RegisterTransfer",
|
||||
"SlotToReg","SlotToReg","Label","FunctionReturn","RegisterTransfer",
|
||||
"Syscall","NilClass"]
|
||||
end
|
||||
|
||||
@ -42,7 +42,7 @@ HERE
|
||||
assert_equal :r2, @interpreter.instruction.array.symbol
|
||||
end
|
||||
def test_get
|
||||
assert_equal Register::GetSlot , ticks(4).class
|
||||
assert_equal Register::SlotToReg , ticks(4).class
|
||||
assert @interpreter.get_register( :r1 )
|
||||
assert Integer , @interpreter.get_register( :r1 ).class
|
||||
end
|
||||
|
Reference in New Issue
Block a user