[Mono-list] Novel Proposal for Mono Compiler Implementations
Tue, 10 Jul 2001 22:07:15 -0500
>David Gardner wrote:
>I like this idea. Maybe it's slightly too radical, but the best ideas are.
>Would you envisage that it would be faster to write a compiler according to
>the 'parsetree + emitter' scheme as opposed to the 'monolith' scheme? It's
>worth further discussion.
John Barnette is correct.
One person project -- no significant time savings. With two or more coders
it would be faster because some coders could work on the parser, others
could work on emitters and that nasty run-time. The clear separation of
tasks would encourage parallelism. The less complex design has all sorts of
obvious advantages. Probably easier to debug. Probably easier to enhance.
Oh, sorry about the tea.
Wesley Felter: Some of your links are dead, can you refind them? Your
information is much appreciated. Many compilers have a parser and emitter,
only they are monolithic. I'm unaware of any compiler that (attempts to)
meets the Open Compiler definition:
* The compiler creates a publicly exposed parsetree.
* The parsetree is designed to encourage new emitters.
* The parsetree is rich with information to support many types of emitters.
* The parsetree is designed for easy traversal.
* The parsetree is designed for emitters written by non-compiler experts.
* Emitters can easily be plugged in.
* New emitters are not encumbered with IP restrictions.
Frank Laub: Your ideas of possible emitters are dead on. I had not thought
of those specific ones.
Rhys: UNCOL is not the same animal as my proposal. In my proposal, the
compiler is specific to a single language. One language compiler to many
emitters. Also, UNCOL's don't follow the above definition. The parsetree is
rich enough to emit either IL or Java bytecodes or anything else.
>David Gardner wrote:
>Surely there has to be some reasonable limit to this. I can't quite
>imagine writing code in C++ and reading it in Prolog and LISP :)
Yes. This would be quite constrained. In perspective, language translation
would be a rarely used benefit of an Open Compiler, although potentially a
hugely important one in some situations.
Get your FREE download of MSN Explorer at http://explorer.msn.com