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:
@ -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
|
||||
|
@ -160,12 +160,11 @@ module Parfait
|
||||
NamedList: {},
|
||||
NilClass: {},
|
||||
Object: {},
|
||||
Factory: { for_type: :Type , next_object: :Object , last_object: :Object ,
|
||||
Factory: { for_type: :Type , next_object: :Object ,
|
||||
reserve: :Object , attribute_name: :Word },
|
||||
ReturnAddress: {next_integer: :ReturnAddress},
|
||||
Space: {classes: :Dictionary , types: :Dictionary , factories: :Dictionary,
|
||||
next_message: :Message , messages: :Message ,
|
||||
next_address: :ReturnAddress ,addresses: :ReturnAddress ,
|
||||
true_object: :TrueClass, false_object: :FalseClass , nil_object: :NilClass},
|
||||
TrueClass: {},
|
||||
Type: {names: :List , types: :List ,
|
||||
|
Reference in New Issue
Block a user