<br><br><div class="gmail_quote">On Mon, Dec 13, 2010 at 12:01 PM, Andreas Raab <span dir="ltr"><<a href="mailto:andreas.raab@gmx.de">andreas.raab@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On 12/13/2010 11:52 AM, Igor Stasenko wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The problem i that we want to swap special objects array. And there<br>
are two approaches:<br>
<br>
1 - create a full object memory , which is a copy of existing objects<br>
(but not everything, just selected pieces). This means that there will<br>
be two 'nils' and therefore need a working #become: for swapping.<br>
<br>
2 - mark a set of objects for inclusion in 'new' image, and throw<br>
away the rest via stubbing. So, this approach avoids copying, but also<br>
it doesn't allows to hold two object memories in object memory at same<br>
time (host and baby one).<br>
</blockquote>
<br></div>
There are at least two more options:<br>
<br>
(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).<br></blockquote><div><br></div><div><br></div><div>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.</div>
<div><br></div><div>good approach </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
(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.<br></blockquote><div><br></div><div>yes; as long as this is primitive Cog can intercept and react apropriately.</div>
<div><br></div><div>cheers</div><div>Eliot </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Cheers,<br><font color="#888888">
- Andreas<br>
</font></blockquote></div><br>