<br><br><div class="gmail_quote">On Tue, Aug 17, 2010 at 6:41 PM, Andreas Raab <span dir="ltr">&lt;<a href="mailto:andreas.raab@gmx.de">andreas.raab@gmx.de</a>&gt;</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 8/17/2010 6:24 PM, Eliot Miranda wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On Tue, Aug 17, 2010 at 5:38 AM, Bert Freudenberg &lt;<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a><br></div><div class="im">
&lt;mailto:<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>&gt;&gt; wrote:<br>
    I thought the three inst vars in Behavior was all the VM knew and<br>
    cared about? I&#39;d consider everything else a bug ;)<br>
<br>
<br>
That&#39;s right.  See all implementors of initializeClassIndices:<br>
<br>
BTW, you /can/ add an inst var to Behavior.  Try and evaluate<br>
<br>
Object subclass: #Behavior<br>
instanceVariableNames: &#39;superclass methodDict format extra&#39;<br>
classVariableNames: &#39;ObsoleteSubclasses&#39;<br>
poolDictionaries: &#39;&#39;<br>
category: &#39;Kernel-Classes&#39;<br>
<br>
Works for me in a 4.1 derived image.<br>
</div></blockquote>
<br>
The problem is in Interpreter&gt;&gt;classNameOf: aClass Is: className which uses the Class&#39; name ivar directly. This causes several &quot;interesting&quot; issues with the SmartSyntaxBlaBlaPlugins (such as JPEGReadWriterPlugin).<br>
</blockquote><div><br></div><div>Eugh.  In the VW VM I added code to choose a class in the specialObjectsArray (Array) and search it for a byte object with the characters &#39;Array&#39; and use that as the class name index.  Similarly its class was searched for an object equal to Array and that slot was used as the thisClass index.  I see I was too lazy to do that in StackInterpreter&gt;&gt;initializeInterpreter but I should, and should introduce classNameIndex and thisClassIndex and use them in place of the hard-coded constants.  That way one can save immediately after adding/removing the behavior inst var and have the VM get things right on start-up.</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>