On Thu, Nov 24, 2011 at 4:58 PM, Stéphane Ducasse <stephane.ducasse@inria.fr
wrote:
We do the same for our bootstrapper. First allocate space for the objects used by the metamodel: Metaclass, Class, Behavior, Object, UndefinedObject, True, False, their instances, metaclasses, etc. Each object of its corresponding size.
how do you compute the size?
Good question. For now we still don't have a design that convinces me in this area. In some cases we calculate it manually, for example in objects without fields. In other cases we take it from the current image, this is the case of metaclass and class. In the end, it depends on which are the compact classes, and what fields you assume that some objects will have, like class and metaclass. After this kernel is bootstraped, objects are created sending new so the size is calculated from the class.
After that, fill the header and fields of these objects. Finally, new objects can be created by sending messages to objects in this kernel.
I was planning to do the same so I would like to see your code. Tomorrow I want to read it.
Stef
Cheers, Javier.
On Wed, Nov 23, 2011 at 10:59 PM, Stéphane Ducasse <
stephane.ducasse@inria.fr> wrote:
Hi
imagine that I want to bootstrap our nice kernel. I will need to somehow create a new nil, true, false, instances of new classes Undefined, True, False. Such instances will then be put on the SpecialObjectArray somehow.
Now I can create a dummy object playing such roles and then use SystemTracer to substitute my placeholder with the true nil falseâ¦. or another trick to swap them. Now anybody has other ideas?
Stef
-- Lic. Javier Pimás Ciudad de Buenos Aires
-- Lic. Javier Pimás Ciudad de Buenos Aires