object format of true, false, nil and others...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

object format of true, false, nil and others...

Stéphane Ducasse
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
Reply | Threaded
Open this post in threaded view
|

Re: object format of true, false, nil and others...

Stefan Marr-4
Hi:

On 23 Nov 2011, at 22:59, Stéphane Ducasse wrote:
> 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.

Something kind of related:

When debugging the VM, I am happy that I always encounter the same object as the first object in the heap. It is some strange string (think it encodes an error message or so).

However, my thought was, also for other purposes, would it be possible to have these special objects sorted to the beginning? Especially, the nilObj would be very handy to have as the first object.

That would need special VM support to arrange it that way, but knowing the nilObj from the very beginning would allow my to initialize some of my hacks more consistently, avoiding C-level NULLs and runtime checks.

Just an idea, vaguely related to the question.

Would be interesting to hear whether there are any historical insights with regard to ordering objects in the image.
Guess it is not done because nobody needed it. (and then there isn't really a primitive for it, and a moving GC might also be contra-productive, etc.)

Best regards
Stefan



>
> Stef

--
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: +32 2 629 2974
Fax:   +32 2 629 3525


Reply | Threaded
Open this post in threaded view
|

Re: object format of true, false, nil and others...

melkyades
In reply to this post by Stéphane Ducasse
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. After that, fill the header and fields of these objects. Finally, new objects can be created by sending messages to objects in this kernel.

Cheers,
Javier.

On Wed, Nov 23, 2011 at 10:59 PM, Stéphane Ducasse <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: object format of true, false, nil and others...

Stéphane Ducasse

> 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?

> 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 <[hidden email]> 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


Reply | Threaded
Open this post in threaded view
|

Re: object format of true, false, nil and others...

melkyades


On Thu, Nov 24, 2011 at 4:58 PM, Stéphane Ducasse <[hidden email]> 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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: object format of true, false, nil and others...

Igor Stasenko
On 24 November 2011 23:29, Javier Pimás <[hidden email]> wrote:

>
>
> On Thu, Nov 24, 2011 at 4:58 PM, Stéphane Ducasse
> <[hidden email]> 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.
>
but you should be able to calculate size taken from object format
descriptor, don't you?

> 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
>> > <[hidden email]> 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



--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: object format of true, false, nil and others...

Frank Shearar-3
In reply to this post by Stéphane Ducasse
On 23 November 2011 21:59, Stéphane Ducasse <[hidden email]> 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?

I recall Michael van der Gulik bootstrapping his SecureSqueak a while
back in a sort've "ab initio" kind of way. Maybe he can offer some
insight?

frank

Reply | Threaded
Open this post in threaded view
|

Re: object format of true, false, nil and others...

Toon Verwaest-2
In reply to this post by Igor Stasenko
On 11/25/2011 12:14 AM, Igor Stasenko wrote:

> On 24 November 2011 23:29, Javier Pimás<[hidden email]>  wrote:
>>
>> On Thu, Nov 24, 2011 at 4:58 PM, Stéphane Ducasse
>> <[hidden email]>  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.
>>
> but you should be able to calculate size taken from object format
> descriptor, don't you?
That's what we do in Pinocchio. We just ask for instSize, amongst other
things... Maybe I'm missing something? :)

>
>> 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
>>>> <[hidden email]>  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
>
>


Reply | Threaded
Open this post in threaded view
|

Re: object format of true, false, nil and others...

Toon Verwaest-2
In reply to this post by Stefan Marr-4
To reply to the question from our pov:

In Pinocchio we actually need that nil, true and false fall within the
first 4gb of virtual memory space, since our native code directly
addresses those objects; and AMD64 code can only use 32bits for direct
addresses.

This is kinda sucky since OSX thinks it's a good idea to reserve the
whole first 4gb virtual address space as "null memory", to ensure they
really really really capture all accidental NULL-pointer dereferences.
And obviously the standard 4K isn't enough for OSX developers. Oh well,
we managed to fix that with some ld flag on OSX.

We do this since it gives a very slight advantage in performance, and we
don't seriously expect nil, true and false to ever change. And if they
do... we can still visit all code in the system and change it :)

cheers,
Toon

On 11/23/2011 11:25 PM, Stefan Marr wrote:

> Hi:
>
> On 23 Nov 2011, at 22:59, Stéphane Ducasse wrote:
>> 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.
> Something kind of related:
>
> When debugging the VM, I am happy that I always encounter the same object as the first object in the heap. It is some strange string (think it encodes an error message or so).
>
> However, my thought was, also for other purposes, would it be possible to have these special objects sorted to the beginning? Especially, the nilObj would be very handy to have as the first object.
>
> That would need special VM support to arrange it that way, but knowing the nilObj from the very beginning would allow my to initialize some of my hacks more consistently, avoiding C-level NULLs and runtime checks.
>
> Just an idea, vaguely related to the question.
>
> Would be interesting to hear whether there are any historical insights with regard to ordering objects in the image.
> Guess it is not done because nobody needed it. (and then there isn't really a primitive for it, and a moving GC might also be contra-productive, etc.)
>
> Best regards
> Stefan
>
>
>
>> Stef


Reply | Threaded
Open this post in threaded view
|

Re: object format of true, false, nil and others...

Stéphane Ducasse
In reply to this post by Toon Verwaest-2
>>>
>>>
>> but you should be able to calculate size taken from object format
>> descriptor, don't you?
> That's what we do in Pinocchio. We just ask for instSize, amongst other things... Maybe I'm missing something? :)

right now I will start with stub to get some momentum and think after.
I was reading the bootstrap of Mate and it should be close to the one of pinocchio.
I'm reading also micro squeak and gst
But I should bump into the walls to progress.

Stef


Reply | Threaded
Open this post in threaded view
|

Re: object format of true, false, nil and others...

Stéphane Ducasse
In reply to this post by Toon Verwaest-2

On Nov 25, 2011, at 10:03 PM, Toon Verwaest wrote:

> To reply to the question from our pov:
>
> In Pinocchio we actually need that nil, true and false fall within the first 4gb of virtual memory space, since our native code directly addresses those objects; and AMD64 code can only use 32bits for direct addresses.
>
> This is kinda sucky since OSX thinks it's a good idea to reserve the whole first 4gb virtual address space as "null memory", to ensure they really really really capture all accidental NULL-pointer dereferences. And obviously the standard 4K isn't enough for OSX developers. Oh well, we managed to fix that with some ld flag on OSX.
>
> We do this since it gives a very slight advantage in performance, and we don't seriously expect nil, true and false to ever change. And if they do... we can still visit all code in the system and change it :)


right now I just need a placeholder after I imagine that the specialObjectArray and system tracer can let me specify what I want in the resulting image.
And may be I could use mate explicit object format description to migrate (instead of systemTracer).

>
> cheers,
> Toon
>
> On 11/23/2011 11:25 PM, Stefan Marr wrote:
>> Hi:
>>
>> On 23 Nov 2011, at 22:59, Stéphane Ducasse wrote:
>>> 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.
>> Something kind of related:
>>
>> When debugging the VM, I am happy that I always encounter the same object as the first object in the heap. It is some strange string (think it encodes an error message or so).
>>
>> However, my thought was, also for other purposes, would it be possible to have these special objects sorted to the beginning? Especially, the nilObj would be very handy to have as the first object.
>>
>> That would need special VM support to arrange it that way, but knowing the nilObj from the very beginning would allow my to initialize some of my hacks more consistently, avoiding C-level NULLs and runtime checks.
>>
>> Just an idea, vaguely related to the question.
>>
>> Would be interesting to hear whether there are any historical insights with regard to ordering objects in the image.
>> Guess it is not done because nobody needed it. (and then there isn't really a primitive for it, and a moving GC might also be contra-productive, etc.)
>>
>> Best regards
>> Stefan
>>
>>
>>
>>> Stef
>
>


Reply | Threaded
Open this post in threaded view
|

Re: object format of true, false, nil and others...

Toon Verwaest-2
In reply to this post by Stéphane Ducasse

>> That's what we do in Pinocchio. We just ask for instSize, amongst other things... Maybe I'm missing something? :)
> right now I will start with stub to get some momentum and think after.
> I was reading the bootstrap of Mate and it should be close to the one of pinocchio.
> I'm reading also micro squeak and gst
> But I should bump into the walls to progress.
>
> Stef
Let me know if you have specific questions I can help with... I'm not
hyper-responsive (nor reading mailing lists) since working on paper and
thesis, but if you mail me directly I might be able to help out with
questions at least.

Toon

Reply | Threaded
Open this post in threaded view
|

Re: object format of true, false, nil and others...

Stéphane Ducasse
Thanks
for now I should eat my own dog food and do it and stop talking or even thinking about it.
But I'm sucked by the world around me (wife, kids, colleagues, mail, admin, I should go to an island without humans and internet).

Stef

On Nov 25, 2011, at 10:14 PM, Toon Verwaest wrote:

>
>>> That's what we do in Pinocchio. We just ask for instSize, amongst other things... Maybe I'm missing something? :)
>> right now I will start with stub to get some momentum and think after.
>> I was reading the bootstrap of Mate and it should be close to the one of pinocchio.
>> I'm reading also micro squeak and gst
>> But I should bump into the walls to progress.
>>
>> Stef
> Let me know if you have specific questions I can help with... I'm not hyper-responsive (nor reading mailing lists) since working on paper and thesis, but if you mail me directly I might be able to help out with questions at least.
>
> Toon
>


Reply | Threaded
Open this post in threaded view
|

Re: object format of true, false, nil and others...

Eliot Miranda-2
In reply to this post by Stefan Marr-4


On Wed, Nov 23, 2011 at 2:25 PM, Stefan Marr <[hidden email]> wrote:
Hi:

On 23 Nov 2011, at 22:59, Stéphane Ducasse wrote:
> 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.

Something kind of related:

When debugging the VM, I am happy that I always encounter the same object as the first object in the heap. It is some strange string (think it encodes an error message or so).

However, my thought was, also for other purposes, would it be possible to have these special objects sorted to the beginning? Especially, the nilObj would be very handy to have as the first object.

Note that Cog assumes that false and true are next to each other.  You'll find in all Pharo/Squeak images that the first three objects are nil, false, true in that order.  Assuming they're contiguous allows the JIT to generate more compact conditional branch code since true = false + 8, and so it only has to load one 32-bit constant and can derive the other by adding a small constant.


That would need special VM support to arrange it that way, but knowing the nilObj from the very beginning would allow my to initialize some of my hacks more consistently, avoiding C-level NULLs and runtime checks.

It's safe to assume nil comes first.  One can imagine experimental contexts where one would want to become nil but the current VMs will very likely crash without some work.  But why waste cycles on every run when it is so unlilkely anyone will try this?


Just an idea, vaguely related to the question.

Would be interesting to hear whether there are any historical insights with regard to ordering objects in the image.
Guess it is not done because nobody needed it. (and then there isn't really a primitive for it, and a moving GC might also be contra-productive, etc.)

Best regards
Stefan



>
> Stef

--
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: <a href="tel:%2B32%202%20629%202974" value="+3226292974">+32 2 629 2974
Fax:   <a href="tel:%2B32%202%20629%203525" value="+3226293525">+32 2 629 3525





--
best,
Eliot

Reply | Threaded
Open this post in threaded view
|

Re: object format of true, false, nil and others...

Igor Stasenko
On 30 November 2011 00:17, Eliot Miranda <[hidden email]> wrote:

>
>
> On Wed, Nov 23, 2011 at 2:25 PM, Stefan Marr <[hidden email]> wrote:
>>
>> Hi:
>>
>> On 23 Nov 2011, at 22:59, Stéphane Ducasse wrote:
>> > 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.
>>
>> Something kind of related:
>>
>> When debugging the VM, I am happy that I always encounter the same object
>> as the first object in the heap. It is some strange string (think it encodes
>> an error message or so).
>>
>> However, my thought was, also for other purposes, would it be possible to
>> have these special objects sorted to the beginning? Especially, the nilObj
>> would be very handy to have as the first object.
>
>
> Note that Cog assumes that false and true are next to each other.  You'll
> find in all Pharo/Squeak images that the first three objects are nil, false,
> true in that order.  Assuming they're contiguous allows the JIT to generate
> more compact conditional branch code since true = false + 8, and so it only
> has to load one 32-bit constant and can derive the other by adding a small
> constant.
>
>>
>> That would need special VM support to arrange it that way, but knowing the
>> nilObj from the very beginning would allow my to initialize some of my hacks
>> more consistently, avoiding C-level NULLs and runtime checks.
>
>
> It's safe to assume nil comes first.  One can imagine experimental contexts
> where one would want to become nil but the current VMs will very likely
> crash without some work.  But why waste cycles on every run when it is so
> unlilkely anyone will try this?
>
even more, since nil, true, false are stateless singletons there is no
much sense to use heap space for them.
they could be identified by a simple immediate value (like
non-existent address).

Even if we imagine some weird experiment with objects , i doubt we
will need to touch these objects at all. Because
they are representing a concepts which cannot be void or replaced by
something else.



--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: object format of true, false, nil and others...

Luc Fabresse
In reply to this post by melkyades
Hi Javier,

2011/11/24 Javier Pimás <[hidden email]>
We do the same for our bootstrapper.

Which boostrapper are you talking about?

Thanks

Luc
 
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. After that, fill the header and fields of these objects. Finally, new objects can be created by sending messages to objects in this kernel.

Cheers,
Javier.


On Wed, Nov 23, 2011 at 10:59 PM, Stéphane Ducasse <[hidden email]> 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

Reply | Threaded
Open this post in threaded view
|

Re: object format of true, false, nil and others...

Luc Fabresse
In reply to this post by Stéphane Ducasse
Hi Stef,

I was reading the bootstrap of Mate and it should be close to the one of pinocchio.

What is "tha bootstrap of Mate"?

Luc
 
I'm reading also micro squeak and gst
But I should bump into the walls to progress.

Stef



Reply | Threaded
Open this post in threaded view
|

Re: object format of true, false, nil and others...

Luc Fabresse
In reply to this post by Stéphane Ducasse
right now I just need a placeholder after I imagine that the specialObjectArray and system tracer can let me specify what I want in the resulting image.

yes
 
And may be I could use mate explicit object format description to migrate (instead of systemTracer).

what is mate? ;-)
Why would you like to replace SystemTracer? is there some cons using it?

Luc

 

>
> cheers,
> Toon
>
> On 11/23/2011 11:25 PM, Stefan Marr wrote:
>> Hi:
>>
>> On 23 Nov 2011, at 22:59, Stéphane Ducasse wrote:
>>> 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.
>> Something kind of related:
>>
>> When debugging the VM, I am happy that I always encounter the same object as the first object in the heap. It is some strange string (think it encodes an error message or so).
>>
>> However, my thought was, also for other purposes, would it be possible to have these special objects sorted to the beginning? Especially, the nilObj would be very handy to have as the first object.
>>
>> That would need special VM support to arrange it that way, but knowing the nilObj from the very beginning would allow my to initialize some of my hacks more consistently, avoiding C-level NULLs and runtime checks.
>>
>> Just an idea, vaguely related to the question.
>>
>> Would be interesting to hear whether there are any historical insights with regard to ordering objects in the image.
>> Guess it is not done because nobody needed it. (and then there isn't really a primitive for it, and a moving GC might also be contra-productive, etc.)
>>
>> Best regards
>> Stefan
>>
>>
>>
>>> Stef
>
>



Reply | Threaded
Open this post in threaded view
|

Re: object format of true, false, nil and others...

Igor Stasenko
On 30 November 2011 10:01, Luc Fabresse <[hidden email]> wrote:

>> right now I just need a placeholder after I imagine that the
>> specialObjectArray and system tracer can let me specify what I want in the
>> resulting image.
>
> yes
>
>>
>> And may be I could use mate explicit object format description to migrate
>> (instead of systemTracer).
>
> what is mate? ;-)

a secret military project, developed in our lab using forced-labor :)))))
Javier, can you tell about it?

> Why would you like to replace SystemTracer? is there some cons using it?

i think it is wrong wording. Mate needs own bootstrapper, and SystemTracer
won't work for it, since its for Squeak.

> Luc
>



--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: object format of true, false, nil and others...

Stéphane Ducasse
In reply to this post by Luc Fabresse
Mate is an experiment to see how to bootstrap VM representation and assembly generation.
It is just the start. Now I was looking at how format is represented.

Because systemTracer is doing that
        taking on object and either map it to another or
        transforming the object header.
        but with bitAnd: and other uglies..

With a first class object representing format and object header encoding the code would be nicer.

Stef


> right now I just need a placeholder after I imagine that the specialObjectArray and system tracer can let me specify what I want in the resulting image.
>
> yes
>  
> And may be I could use mate explicit object format description to migrate (instead of systemTracer).
>
> what is mate? ;-)
> Why would you like to replace SystemTracer? is there some cons using it?
>
> Luc
>
>  
>
> >
> > cheers,
> > Toon
> >
> > On 11/23/2011 11:25 PM, Stefan Marr wrote:
> >> Hi:
> >>
> >> On 23 Nov 2011, at 22:59, Stéphane Ducasse wrote:
> >>> 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.
> >> Something kind of related:
> >>
> >> When debugging the VM, I am happy that I always encounter the same object as the first object in the heap. It is some strange string (think it encodes an error message or so).
> >>
> >> However, my thought was, also for other purposes, would it be possible to have these special objects sorted to the beginning? Especially, the nilObj would be very handy to have as the first object.
> >>
> >> That would need special VM support to arrange it that way, but knowing the nilObj from the very beginning would allow my to initialize some of my hacks more consistently, avoiding C-level NULLs and runtime checks.
> >>
> >> Just an idea, vaguely related to the question.
> >>
> >> Would be interesting to hear whether there are any historical insights with regard to ordering objects in the image.
> >> Guess it is not done because nobody needed it. (and then there isn't really a primitive for it, and a moving GC might also be contra-productive, etc.)
> >>
> >> Best regards
> >> Stefan
> >>
> >>
> >>
> >>> Stef
> >
> >
>
>
>


12