use slot constants

This commit is contained in:
Torsten Ruger 2014-09-11 21:30:40 +03:00
parent b7e0d3fba4
commit b29de4600e
3 changed files with 2 additions and 5 deletions

View File

@ -7,7 +7,7 @@ module Register
# save return register and create a new frame
to = RegisterReference.new(:r0) # message base
pc = RegisterReference.new(:pc)
move1 = RegisterMachine.instance.str( pc , to , Virtual::Message::RETURN )
move1 = RegisterMachine.instance.str( pc , to , Virtual::Slot::RETURN )
block.replace(code , [move1] )
end
end

View File

@ -6,7 +6,7 @@ module Register
#load the return address into pc, affecting return. (other cpus have commands for this, but not arm)
message = RegisterReference.new(:r0)
pc = RegisterReference.new(:pc)
move1 = RegisterMachine.instance.ldr( pc ,message , Virtual::Message::RETURN )
move1 = RegisterMachine.instance.ldr( pc ,message , Virtual::Slot::RETURN )
block.replace(code , [move1] )
end
end

View File

@ -20,9 +20,6 @@ module Virtual
# During compilation Message and frame objects are created to do type analysis
class Message
RETURN = 2
EXCEPTION = 3
SELF = 4
SELF_REG = :r0
MESSAGE_REG = :r1