[Vm-dev] Works in SqueakVM but not Cog

Eliot Miranda eliot.miranda at gmail.com
Mon Dec 13 20:30:03 UTC 2010


On Mon, Dec 13, 2010 at 12:01 PM, Andreas Raab <andreas.raab at gmx.de> wrote:

>
> On 12/13/2010 11:52 AM, Igor Stasenko wrote:
>
>> The problem i that we want to swap special objects array. And there
>> are two approaches:
>>
>> 1  - create a full object memory , which is a copy of existing objects
>> (but not everything, just selected pieces). This means that there will
>> be two 'nils' and therefore need a working #become: for swapping.
>>
>> 2  - mark a set of objects for inclusion in 'new' image, and throw
>> away the rest via stubbing. So, this approach avoids copying, but also
>> it doesn't allows to hold two object memories in object memory at same
>> time (host and baby one).
>>
>
> There are at least two more options:
>
> (3) Write a primitive that replaces the special objects array and includes
> a set of classes to be updated (this would include all the literals).
>


which would give Cog the opportunity to void its code cache, hence  avoiding
its limitations w.r.t. nil true false and the character table.

good approach


>
> (4) A variant on the above would make all these classes be compact and have
> them switch implicitly by replacing the compact classes array in the
> splObjs.
>

yes; as long as this is primitive Cog can intercept and react apropriately.

cheers
Eliot


> Cheers,
>  - Andreas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20101213/5c01a7cd/attachment.htm


More information about the Vm-dev mailing list