[Vm-dev] About the image
Andreas Raab
andreas.raab at gmx.de
Thu Aug 19 03:48:51 UTC 2010
On 8/18/2010 9:59 AM, Eliot Miranda wrote:
> On Wed, Aug 18, 2010 at 8:33 AM, Andreas Raab <andreas.raab at gmx.de
> <mailto:andreas.raab at gmx.de>> wrote:
> I'm not entirely sure about that. You do have to maintain the
> information that after adding an ivar you'll have to save and
> restart the image or else strange things will happen. This effect is
> nowhere documented. With the index you could automate the process
> (using the ClassBuilder notification) so that if Class chnages shape
> it updates the splObj entry automatically.
>
> That's a fair point, but changing the shape of Behavior is an edge case
> anyway, and the VM code with the specialObjectsArray approach is ugly
> self integerValueFor: (self splObj: ClassNameIndexIndex)
> and much more fragile (e.g. if this entry gets damaged then no
> printCallStack)
>
> One could just as easily document the VM behavior by changing the
> ClassBuilder to notify that when the name and thisClass inst vars change
> their index the programmer should save quit and resume, as make the
> ClassBuilder update a specialObjectsArray entry.
True. In reality, I don't care which way it's done but I agree with
Bert's fundamental point that having hidden information about that stuff
ain't a good idea so having such notification sounds like a very good
idea indeed (and very easy to do).
Cheers,
- Andreas
More information about the Vm-dev
mailing list