Does the Squeak compiler generate properly tail recursive code?
Paolo
amoroso@mclink.it (Paolo Amoroso) wrote...
Does the Squeak compiler generate properly tail recursive code?
No, but the show ain't over yet.
What the Squeak compiler does or doesn't do should become much less of an issue as we move toward dynamic translation. There you have much greater command of run-time structures, concrete type information, and the freedom to cheat left and right (as long as you don't get caught ;-). In some sense the destiny of the visible Squeak compiler is probably to become as simple and NON optimized as possible (there are also some truly beautiful things that become possible when, eg, ifTrue: gets sent as a real message, but that's another story...).
I don't think Jitter 2 will do tail recursion at first release but, modulo the problems already mentioned, it's a clear possibility.
Incidentally, I still remember a really cogent point made by James McCartney two years ago (3/14/97) on this list -- namely that a similar and generally more practical optimization is redirection with the same arguments.
For instance... at: index ^ self basicAt: index or... displayOn: aMedium ^ myImage displayOn: aMedium
It's the same territory -- situations where the proper context is all set up, and you can just move in without having to build a whole new house. James actually does this in his SuperCollider system.
- Dan
On Fri, 29 Jan 1999 11:06:21 -0800, you wrote:
No, but the show ain't over yet.
What the Squeak compiler does or doesn't do should become much less of an issue as we move toward dynamic translation.
Do you mean that the Squeak compiler is--or will be--based on a different "optimization paradigm", perhaps related in some way to that of Self?
Paolo
amoroso@mclink.it (Paolo Amoroso) wrote...
Do you mean that the Squeak compiler is--or will be--based on a different "optimization paradigm", perhaps related in some way to that of Self?
No, not at all. At this point I would leave it pretty much as is, and leave optimizations up to Jitter. I simply meant that if we WERE going to change anything, it should be toward simplicity, not further complexity.
- Dan.
squeak-dev@lists.squeakfoundation.org