[ANN] New Version of VI4 (block closures)

Avi Bryant squeak-dev at lists.squeakfoundation.org
Wed Oct 23 23:13:41 UTC 2002


On Wed, 23 Oct 2002, Anthony Hannan wrote:

> "Andrew C. Greenberg" <werdna at mucow.com> wrote:
> > Can anyone account for this remarkable increase in speed?  I would
> > think that the incorporation of block closures would tend to slow,
> > rather than increase the speed of the interpreter.  Is something
> > missing or counted differently, or should we immediately dump the
> > present VM for a way more efficient machine?
>
> The increase in speed is due to getting rid of context objects in favor
> of a stack, and getting rid of the frame pointer and having all stack
> accesses be referenced from the stack pointer which is in a register.
> See the aboutVI4 method comment or the description at
> http://minnow.cc.gatech.edu/squeak/VI4 for more details.

Anthony,

I've been puzzling over how to adapt #callCC to this change.  What I need,
more or less, is some way to capture and copy the current stack, IP,
etc, and then restore these at a later point - even once the original
stack has been unwound.

The naive approach (copying FiniteStack objects and messing with the
'stack' ivar of Process2) tends to segfault the VM.  Suggestions?

Avi




More information about the Squeak-dev mailing list