[Squeak-e] Programming the VM

Andreas Raab andreas.raab at gmx.de
Mon Feb 3 22:18:10 CET 2003


Mark,

Don't get me wrong here - if adding an extra word to the object header is
the best solution for the problem it might be a worthwhile change to make. I
was just trying to point out that such a change really deserves a good
reason to make it and from what I can tell this is currently just one of the
possible design alternatives (I'm travelling so I haven't entirely caught up
with everything going on).

Re: Virtualizing classes
You lost me somewhere. I don't exactly understand what the point about
"virtualizing objects/classes" really is. So I can't quite comment on the
overall issue but it seems to me that what you are describing is technically
feasable.

Cheers,
  - Andreas

> -----Original Message-----
> From: squeak-e-bounces at lists.squeakfoundation.org 
> [mailto:squeak-e-bounces at lists.squeakfoundation.org] On 
> Behalf Of Mark S. Miller
> Sent: Monday, February 03, 2003 10:01 PM
> To: Squeak-E - a capability-secure Squeak
> Subject: RE: [Squeak-e] Programming the VM
> 
> 
> At 12:41 PM 2/3/2003 Monday, Andreas Raab wrote:
> >> Ok. My gut feeling is indeed that this is better than 
> dynamic scoping.
> >> So we need an extra slot. Time to bring in the VM hacking squad ;-)
> >> 
> >> (FYI: the VM object format is destined to change in Squeak 3.5, for
> >> 'real' closures or whatever. So this is the ideal time to 
> request such
> >> changes).
> >
> >I don't know where you heard that the object format is going 
> to be changed
> >in 3.5 but adding a pointer to every object is unlikely to 
> be done unless
> >you have a Very Good Reason(tm). It will instantly break all 
> plugins and the
> >added space and GC overhead is not to be taken lightly.
> 
> Ok, here's another way to do it. Instead of modifying the format of a 
> virtualized object, have the virtualized object point at a 
> virtualized 
> class instead of the real one. Make the layout changes in the 
> virtualized 
> class. 
> 
> Each class "loaded" into a given virtual "machine", ie, each class 
> that will be instantiated by a given virtualizer, ie, each 
> class that is to 
> be as-if interpreted by that virtualizer, is itself first 
> virtualized. This 
> means that a new Behavior object of some kind is allocated, 
> usually sharing 
> method dictionary with the original class object as well as 
> wrapping the 
> original class object. (Can two behaviors in Smalltalk share a method 
> dictionary?) The instance is now just the regular instance, 
> but points at 
> the virtualized class instead of the real one.
> 
> Instances of normal classes would be unchanged, would be 
> normal Squeak 
> objects, and would be seen by Squeak-E as primitive objects; 
> just as E sees 
> Java objects.
> 
> Could this work? Might it even work without needing any VM changes?
> 
> 
> ----------------------------------------
> Text by me above is hereby placed in the public domain
> 
>         Cheers,
>         --MarkM
> 
> _______________________________________________
> Squeak-e mailing list
> Squeak-e at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/squeak-e
> 



More information about the Squeak-e mailing list