Adding a new imediate type

Hans-Martin Mosner hmm at heeg.de
Wed Jan 11 07:04:06 UTC 2006


Alan Lovejoy wrote:

>Andresas wrote: "This may be a misunderstanding"
>
>Yes. And now that I think on it, I see that your explanation regarding why
>adding an inst var to Object fails is correct. Thanks for correcting me.
>
>--Alan
>  
>
Apart from the objects whose layout is known by the VM, there's another 
showstopper:
Since the immediate objects can't have instance variables, their whole 
inheritance chain must not define instance variables.
A similar argument is probably true for the non-pointer indexed objects 
(Compiled method being a notorious counter-example, but that class needs 
a bit of special attention by the VM).
So adding an inst var to Object is definitely not possible.
Adding an additional header field, as Jörg wanted to do originally, is 
possible, although not exactly easy.
If I had to solve the underlying problem, I'd probably look for other 
options.

Cheers,
Hans-Martin



More information about the Squeak-dev mailing list