unify space collection attribute naming

currently space is still acting as a sort of memory manager.
For proper linking, all objects must be reachable from space, hence the plural versions like messages and addresses (even they are instances, it is the list that is important)
To dish out instance to use, the head must be kept, ie next_XXX for intergers, return addresses and messages
This commit is contained in:
Torsten Ruger
2018-07-02 15:49:51 +03:00
parent 07a154be70
commit 1132309f6a
13 changed files with 38 additions and 34 deletions

View File

@ -51,9 +51,9 @@ module Risc
builder = compiler.compiler_builder(compiler.method)
builder.build do
space << Parfait.object_space
message << space[:first_message]
message << space[:next_message]
next_message << message[:next_message]
space[:first_message] << next_message
space[:next_message] << next_message
end
Mom::MessageSetup.new(Parfait.object_space.get_main).build_with( builder )

View File

@ -141,9 +141,10 @@ module Parfait
Object: {},
BinaryCode: {next: :BinaryCode} ,
Space: {classes: :Dictionary , types: :Dictionary ,
first_message: :Message , next_integer: :Integer ,
true_object: :TrueClass, next_address: :ReturnAddress ,
false_object: :FalseClass , nil_object: :NilClass},
next_message: :Message , messages: :Message ,
next_integer: :Integer, integers: :Integer ,
next_address: :ReturnAddress ,addresses: :ReturnAddress ,
true_object: :TrueClass, false_object: :FalseClass , nil_object: :NilClass},
NamedList: {},
Type: {names: :List , types: :List ,
object_class: :Class, methods: :TypedMethod } ,