rename set_slot

set_slot was clear about the target, but not the source.
Better with reg_to_slot (and soon it’s inverse slot_to_reg)
This commit is contained in:
Torsten Ruger
2016-12-25 18:02:39 +02:00
parent 1b8d6149dd
commit 35adf9a5e6
31 changed files with 126 additions and 115 deletions

View File

@ -17,9 +17,9 @@ HERE
def test_chain
#show_ticks # get output of what is
check_chain ["Branch","Label","LoadConstant","GetSlot","SetSlot",
"LoadConstant","SetSlot","FunctionCall","Label","LoadConstant",
"LoadConstant","OperatorInstruction","SetSlot","Label","FunctionReturn",
check_chain ["Branch","Label","LoadConstant","GetSlot","RegToSlot",
"LoadConstant","RegToSlot","FunctionCall","Label","LoadConstant",
"LoadConstant","OperatorInstruction","RegToSlot","Label","FunctionReturn",
"RegisterTransfer","Syscall","NilClass"]
end

View File

@ -36,9 +36,9 @@ class AddChange < MiniTest::Test
def test_chain
#show_ticks # get output of what is
check_chain ["Branch","Label","LoadConstant","GetSlot","SetSlot",
"LoadConstant","SetSlot","FunctionCall","Label","LoadConstant",
"LoadConstant","OperatorInstruction","SetSlot","Label","FunctionReturn",
check_chain ["Branch","Label","LoadConstant","GetSlot","RegToSlot",
"LoadConstant","RegToSlot","FunctionCall","Label","LoadConstant",
"LoadConstant","OperatorInstruction","RegToSlot","Label","FunctionReturn",
"RegisterTransfer","Syscall","NilClass"]
end

View File

@ -20,11 +20,11 @@ HERE
def test_chain
#show_ticks # get output of what is
check_chain ["Branch","Label","LoadConstant","GetSlot","SetSlot",
"LoadConstant","SetSlot","FunctionCall","Label","GetSlot",
"LoadConstant","SetSlot","LoadConstant","SetSlot","LoadConstant",
"SetSlot","LoadConstant","SetSlot","LoadConstant","SetSlot",
"LoadConstant","SetSlot","RegisterTransfer","FunctionCall","Label",
check_chain ["Branch","Label","LoadConstant","GetSlot","RegToSlot",
"LoadConstant","RegToSlot","FunctionCall","Label","GetSlot",
"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",
"FunctionReturn","RegisterTransfer","Syscall","NilClass"]

View File

@ -32,17 +32,17 @@ HERE
s(:false_statements, s(:call, s(:name, :putstring), s(:arguments), s(:receiver, s(:string, "else"))))))
end
def test_if
show_ticks # get output of what is
check_chain ["Branch","Label","LoadConstant","GetSlot","SetSlot",
"LoadConstant","SetSlot","FunctionCall","Label","GetSlot",
"GetSlot","SetSlot","LoadConstant","SetSlot","LoadConstant",
"SetSlot","LoadConstant","SetSlot","LoadConstant","SetSlot",
#show_ticks # get output of what is
check_chain ["Branch","Label","LoadConstant","GetSlot","RegToSlot",
"LoadConstant","RegToSlot","FunctionCall","Label","GetSlot",
"GetSlot","RegToSlot","LoadConstant","RegToSlot","LoadConstant",
"RegToSlot","LoadConstant","RegToSlot","LoadConstant","RegToSlot",
"RegisterTransfer","FunctionCall","Label","GetSlot","LoadConstant",
"OperatorInstruction","IsZero","GetSlot","LoadConstant","SetSlot",
"LoadConstant","SetSlot","LoadConstant","SetSlot","LoadConstant",
"SetSlot","RegisterTransfer","FunctionCall","Label","GetSlot",
"OperatorInstruction","IsZero","GetSlot","LoadConstant","RegToSlot",
"LoadConstant","RegToSlot","LoadConstant","RegToSlot","LoadConstant",
"RegToSlot","RegisterTransfer","FunctionCall","Label","GetSlot",
"GetSlot","RegisterTransfer","Syscall","RegisterTransfer","RegisterTransfer",
"SetSlot","Label","FunctionReturn","RegisterTransfer","GetSlot",
"RegToSlot","Label","FunctionReturn","RegisterTransfer","GetSlot",
"GetSlot","Branch","Label","Label","FunctionReturn",
"RegisterTransfer","GetSlot","GetSlot","Label","FunctionReturn",
"RegisterTransfer","Syscall","NilClass"]

View File

@ -19,9 +19,9 @@ HERE
def test_mult
#show_ticks # get output of what is
check_chain ["Branch","Label","LoadConstant","GetSlot","SetSlot",
"LoadConstant","SetSlot","FunctionCall","Label","LoadConstant",
"LoadConstant","OperatorInstruction","SetSlot","Label","FunctionReturn",
check_chain ["Branch","Label","LoadConstant","GetSlot","RegToSlot",
"LoadConstant","RegToSlot","FunctionCall","Label","LoadConstant",
"LoadConstant","OperatorInstruction","RegToSlot","Label","FunctionReturn",
"RegisterTransfer","Syscall","NilClass"]
check_return 0
end

View File

@ -17,9 +17,9 @@ HERE
def test_add
#show_ticks # get output of what is
check_chain ["Branch","Label","LoadConstant","GetSlot","SetSlot",
"LoadConstant","SetSlot","FunctionCall","Label","LoadConstant",
"LoadConstant","OperatorInstruction","SetSlot","Label","FunctionReturn",
check_chain ["Branch","Label","LoadConstant","GetSlot","RegToSlot",
"LoadConstant","RegToSlot","FunctionCall","Label","LoadConstant",
"LoadConstant","OperatorInstruction","RegToSlot","Label","FunctionReturn",
"RegisterTransfer","Syscall","NilClass"]
check_return 0
end

View File

@ -17,12 +17,12 @@ HERE
def test_chain
#show_ticks # get output of what is
check_chain ["Branch","Label","LoadConstant","GetSlot","SetSlot",
"LoadConstant","SetSlot","FunctionCall","Label","GetSlot",
"LoadConstant","SetSlot","LoadConstant","SetSlot","LoadConstant",
"SetSlot","LoadConstant","SetSlot","RegisterTransfer","FunctionCall",
check_chain ["Branch","Label","LoadConstant","GetSlot","RegToSlot",
"LoadConstant","RegToSlot","FunctionCall","Label","GetSlot",
"LoadConstant","RegToSlot","LoadConstant","RegToSlot","LoadConstant",
"RegToSlot","LoadConstant","RegToSlot","RegisterTransfer","FunctionCall",
"Label","GetSlot","GetSlot","RegisterTransfer","Syscall",
"RegisterTransfer","RegisterTransfer","SetSlot","Label","FunctionReturn",
"RegisterTransfer","RegisterTransfer","RegToSlot","Label","FunctionReturn",
"RegisterTransfer","GetSlot","GetSlot","Label","FunctionReturn",
"RegisterTransfer","Syscall","NilClass"]
end

View File

@ -20,12 +20,12 @@ HERE
def test_chain
#show_ticks # get output of what is
check_chain ["Branch","Label","LoadConstant","GetSlot","SetSlot",
"LoadConstant","SetSlot","FunctionCall","Label","GetSlot",
"LoadConstant","SetSlot","LoadConstant","SetSlot","LoadConstant",
"SetSlot","LoadConstant","SetSlot","LoadConstant","SetSlot",
check_chain ["Branch","Label","LoadConstant","GetSlot","RegToSlot",
"LoadConstant","RegToSlot","FunctionCall","Label","GetSlot",
"LoadConstant","RegToSlot","LoadConstant","RegToSlot","LoadConstant",
"RegToSlot","LoadConstant","RegToSlot","LoadConstant","RegToSlot",
"RegisterTransfer","FunctionCall","Label","GetSlot","GetSlot",
"GetByte","SetSlot","Label","FunctionReturn","RegisterTransfer",
"GetByte","RegToSlot","Label","FunctionReturn","RegisterTransfer",
"GetSlot","GetSlot","Label","FunctionReturn","RegisterTransfer",
"Syscall","NilClass"]
end