better names for index constants

This commit is contained in:
Torsten Ruger
2015-06-21 21:09:15 +03:00
parent 836089a249
commit 9c21f4274d
5 changed files with 28 additions and 24 deletions

View File

@ -16,7 +16,7 @@ module Register
# move the current new_message to message
new_codes << RegisterTransfer.new( slot::NEW_MESSAGE_REGISTER , slot::MESSAGE_REGISTER )
# "roll out" self into its register
new_codes << GetSlot.new( slot::SELF_REGISTER ,slot::MESSAGE_REGISTER , Virtual::MESSAGE_SELF )
new_codes << GetSlot.new( slot::SELF_REGISTER ,slot::MESSAGE_REGISTER , Virtual::SELF_INDEX )
# do the register call
new_codes << FunctionCall.new( code.method )
block.replace(code , new_codes )

View File

@ -8,12 +8,12 @@ module Register
# move the current message to new_message
new_codes << RegisterTransfer.new( slot::MESSAGE_REGISTER , slot::NEW_MESSAGE_REGISTER )
# and restore the message from saved value in new_message
new_codes << GetSlot.new( slot::NEW_MESSAGE_REGISTER , Virtual::MESSAGE_CALLER , slot::MESSAGE_REGISTER)
new_codes << GetSlot.new( slot::NEW_MESSAGE_REGISTER , Virtual::CALLER_INDEX , slot::MESSAGE_REGISTER)
# "roll out" self and frame into their registers
new_codes << GetSlot.new( slot::MESSAGE_REGISTER , Virtual::MESSAGE_SELF , slot::SELF_REGISTER )
new_codes << GetSlot.new( slot::MESSAGE_REGISTER , Virtual::MESSAGE_FRAME , slot::FRAME_REGISTER )
new_codes << GetSlot.new( slot::MESSAGE_REGISTER , Virtual::SELF_INDEX , slot::SELF_REGISTER )
new_codes << GetSlot.new( slot::MESSAGE_REGISTER , Virtual::FRAME_INDEX , slot::FRAME_REGISTER )
#load the return address into pc, affecting return. (other cpus have commands for this, but not arm)
new_codes << FunctionReturn.new( slot::MESSAGE_REGISTER , Virtual::MESSAGE_RETURN_ADDRESS )
new_codes << FunctionReturn.new( slot::MESSAGE_REGISTER , Virtual::RETURN_INDEX )
block.replace(code , new_codes )
end
end