[Vm-dev] About the image
eliot.miranda at gmail.com
Wed Aug 18 01:54:59 UTC 2010
On Tue, Aug 17, 2010 at 6:41 PM, Andreas Raab <andreas.raab at gmx.de> wrote:
> On 8/17/2010 6:24 PM, Eliot Miranda wrote:
>> On Tue, Aug 17, 2010 at 5:38 AM, Bert Freudenberg <bert at freudenbergs.de
>> <mailto:bert at freudenbergs.de>> wrote:
>> I thought the three inst vars in Behavior was all the VM knew and
>> cared about? I'd consider everything else a bug ;)
>> That's right. See all implementors of initializeClassIndices:
>> BTW, you /can/ add an inst var to Behavior. Try and evaluate
>> Object subclass: #Behavior
>> instanceVariableNames: 'superclass methodDict format extra'
>> classVariableNames: 'ObsoleteSubclasses'
>> poolDictionaries: ''
>> category: 'Kernel-Classes'
>> Works for me in a 4.1 derived image.
> The problem is in Interpreter>>classNameOf: aClass Is: className which uses
> the Class' name ivar directly. This causes several "interesting" issues with
> the SmartSyntaxBlaBlaPlugins (such as JPEGReadWriterPlugin).
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 'Array' 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>>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.
> - Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev