[squeak-dev] A Bootstrap Compiler

Yoshiki Ohshima yoshiki at vpri.org
Tue Dec 28 16:48:25 UTC 2010


At Tue, 28 Dec 2010 11:32:52 +0100,
Igor Stasenko wrote:
> 
> On 28 December 2010 11:19, Yoshiki Ohshima <yoshiki at vpri.org> wrote:
> >  Hi,
> >
> >  We've been playing with John's MicroSqueak and it occured to me that
> > having a bytecode compiler that is implemented outside of Squeak opens
> > some possibilities, such as generate a growable image file from all
> > text files, or make deep changes to the system without shooting
> > yourself.
> >
> > I wrote a longer explanation so if you are interested, please go to:
> >
> > https://github.com/yoshikiohshima/SqueakBootstrapper
> >
> > and check it out.
> >
> 
> Been there did that :)

  Ah, now I remember you mentioned it before.

> Implementing ST compiler in C is not very hard, since syntax is
> extremely simple (comparing to C).
> But the thing is that now you need to keep image-side compiler and C
> compiler in sync.
> And very soon you will figure out, that while its extermely easy to
> extend ST compiler in ST,
> its very hard to do that in C (see things like Helvetia by Lukas Renggli etc).

  Well, my bootstrap compiler and image compiler are both in variants
of PEG parser generators.  And, presumably both should be the same
source but only use different backend, as Nikolay suggested.  So, C is
just a convenience target I could use, but not really essential.

> What i like about image-side compiler that i can use the
> metaprogramming and late-binding capabilities
> in language for compiling the source.
> While C compiler having no such flexibility, and good to have when you
> plan to freeze things for ages.
> 
> That's why i prefer to implement bootstrap in smalltalk. Because it
> really doesn't matters , in which language
> you implementing a bootstrap..
> 
> Sorry, if my comment was discouraging. But i had to say it :)

  Not at all.  I should also stress that our main project is make a
new system, and this is just a side project for my learning cuve to
understand things in terms of Squeak.  I probably am not going to so
much time on this variant, but would like to do similar thing for a
new system...

  Thanks!

-- Yoshiki



More information about the Squeak-dev mailing list