move return address generation to factory

removes the list from space
adds a ReturnAddress factory instead
and uses these throughout
This commit is contained in:
Torsten Ruger
2018-08-29 21:02:49 +03:00
parent f993ccefe3
commit c983dcf0eb
7 changed files with 25 additions and 35 deletions

View File

@ -65,7 +65,7 @@ module Risc
# An integer is plucked from object_space abd added to the machine constant pool
# if none was given
def self.label( source , name , position = nil , nekst = nil)
position = Parfait.object_space.get_address unless position
position = Parfait.object_space.get_next_for(:ReturnAddress) unless position
Label.new( source , name , position, nekst )
end
end