[squeak-dev] A Bootstrap Compiler
Jecel Assumpcao Jr.
jecel at merlintec.com
Tue Dec 28 19:02:21 UTC 2010
While I am on the side of those who prefer to work in Smalltalk than in
C, there are several projects which have used the opposite approach and
I can understand why they were done that way.
Little Smalltalk from Tim Budd comes (depending on the version) as a set
of C files that get compiled to two executables: the virtual machine and
the image builder. The latter reads a text file which is in a format
that is very easy to edit and generates an image that the virtual
machine can use. The Smalltalk parser in C is the main code that the
image builder had which isn't also a part of the virtual machine.
The Self VM is a huge C++ program which also includes the
Self-to-bytecodes translator. When the VM starts up without an image it
creates an "empty" world with a minimum set of objects and can grow from
there by reading source files. There was a translator written in Self as
one of the benchmarks, but since it wasn't actually used by the system
it became outdated very quickly and is now only of historical interest.
Slate has gone through three rather different implementation, each with
its own bootstrapping scheme. There are many good ideas in this system
I am not familiar with the details of GNU Smalltalk, but since it
doesn't need an image to run it almost certainly includes a Smalltalk
compiler in C -
For those of us who want to do it all in Smalltalk, we have projects
like Klein (Self-in-Self - http://kleinvm.sourceforge.net/) and Huemul
Smalltalk (uses as many OS libraries as possible and the Squeak Exupery
compiler for dealing with Smalltalk code -
) as examples.
More information about the Squeak-dev