VI4 & J5 (was: Where Squeak is Headed [was: Module discussion])

Anthony Hannan ajh18 at cornell.edu
Fri Nov 8 20:15:02 UTC 2002


Dan Ingalls <Dan at SqueakLand.org> wrote:
> Looking at the next six months, I feel that Ian's design for J5 goes beyond Anthony's work on the BCVM and, if possible, I would like to see J5 completed and made part of the mainstream Squeak VM support.  At the same time, Anthony has done all the hard work of converting Squeak to use proper closures, and it would be ideal if that experience could be salvaged and recreated in the context of Squeak with J5.  It's conceivable that this could be done in a way that the resulting image could be run with the BCVM or J5 interchangeably -- only Anthony and Ian could say if this makes sense.

I would really like to see J5 developed for a new image format.  This
way Ian would be free to make bytecodes and context/stack objects
suitable for J5, instead of having to adapt to the 3.2 bytecodes and
contexts that are not ideal.  For example, instead of dealing with two
type of contexts (block and method contexts), he only has to deal with
one type of context in VI4.  What ever bytecodes and context/stack
structure he would like, I'm sure I could adapt VI4 to it pretty easily.

A big part of VI4 was rewriting the Smalltalk Compiler.  I made it easy
to change bytecodes, and I added optimization.  In J3
(http://www-sor.inria.fr/~piumarta/squeak/unix/zip/j3-2.6.0/doc/j3/),
Ian had to optimize certain bytecode sequences like chained jumps.  The
VI4 compiler does this for him.

In VI4, I also separated suspended processes from running/waiting
processes.  Suspended processes can be manipulated from the image, while
running/waiting processes can not.  This relieves Ian from having to
worry about changes to active contexts from the image.  Instead he only
has to objectify a process on primitiveSuspend and internalize on
primitiveResume.  He has to do anyway when saving and loading the image.

I believe VI4 right now is very stable (I use it all the time with no
crashes) and I don't have any more changes/enhancements I want to make
to it.  So it is ready for Ian to play with.  The only things that still
need some work are: (1) There are some bugs in the bytecode decompiler
(specifically to-do loops) but most cases work; (2) Image segments with
old compiled methods won't load, I still have to add a converter to the
loader.

Anyway, I think VI4 and J5 can be very complimentary - VI4 on the image
side and J5 on the VM side.

Cheers,
Anthony



More information about the Squeak-dev mailing list