[squeak-dev] Compiler

Colin Putney colin at wiresong.com
Tue Jun 19 07:19:49 UTC 2012


So I was poking around in Compiler today, and noticed that it's a
bit... messy. I had a few ideas for improvement, but before I go
monkeying with such an important part of the system, I thought I'd
bring it up here. Do we have a long- or medium-term plan for how the
compiler should evolve?

As I see it there are a few paths available to us:

1. Incremental improvement. The compiler we have now is tried and
true. Now that we have proper block closures and a high performance
VM, there's no real need to improve bytecode generation, so we
shouldn't put much effort into this part of the system. We'll just
make small improvements and minor refactorings as needed.

2. Adopt an existing project. There have been a few "new compiler"
projects over the years, and one or another of them might present an
opportunity for signifiant improvement over the status quo. I'm
thinking of ByteSurgeon, Opal, AOStA etc. It's not something we'll
rush into, but eventually, when the code is mature, we'll want to
replace the current compiler.

3. Something completely new. Now that we have closures and a fast VM,
existing projects aren't relevant anymore, but we have new
opportunities for improvement. VM-level changes, such as a new object
format or new bytecodes could drive this option, if they're big enough
that significant work on the compiler is required anyway. Maybe we can
only see the broad outlines of what the project might look like at the
moment, but we can see it on the horizon.

So, are there any pain points right now that we should think about
addressing? Is anybody planning or considering working on something
compiler-related?

Eliot, is there anything in the new object format that will have an
impact on image-side compilation? I seem to remember you mentioning
something about efficiently supporting alternate bytecode sets. Is
that meant for Newspeak, or do you have something in mind for
Smalltalk?

I don't think we have to come up with a definitive plan just now, I
just want to get a sense of what people are thinking.

Colin


More information about the Squeak-dev mailing list