"Just Curious" VM question

Tim Rowledge tim at sumeru.stanford.edu
Tue Sep 16 16:56:48 UTC 2003


In message <20030916081356.H2389-100000 at tif.inria.fr>
          Ian Piumarta <ian.piumarta at inria.fr> wrote:

> On Mon, 15 Sep 2003, Tim Rowledge wrote:
> > "Andreas Raab" <andreas.raab at gmx.de> wrote:
> > > No problem really. Just a few cycles spent doing the externalizeIPandSP, a
> > So don't do the externalizeIPandSP. Pass them as args; we've already
> > gone to some trouble to get them into registers whenever possible so
> > calling primAt(ip, sp) or whatever isn't likely to be a problem. Except
> > perhaps
> 
> when the prim triggers a GC.
So Don't Do That(tm). None of the things I would consider suitable for
these functionelles would be more than a few lines. Anything more
complex needs another approach, obviously. Just for starters I really
hate to see prims allocating objects all over the place because it
circumvents any attempt to have all the mechanism in the VM and all the
policy in the image. Whenever possible I'd like to see prims either
taking an object as an argument and filling it out, or at least failing
if a gc would be needed. Retry code would then know it had space.

If you want to get tricky, make a gc externalize the ip/sp/whatever and
then have the functionelle return trigger a reload in the main caller.

ie something like
if((functionelle)(ip,sp)) internalizeIPandSP(); blahblah;


tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Useful Latin Phrases:- Utinam barbari spatium proprium tuum invadant! =
May barbarians invade your personal space!



More information about the Squeak-dev mailing list