|Java Backend email@example.com (Ben L. Titzer) (2003-03-09)|
|Re: Java Backend firstname.lastname@example.org (Basile STARYNKEVITCH) (2003-03-14)|
|From:||Basile STARYNKEVITCH <email@example.com>|
|Date:||14 Mar 2003 11:06:26 -0500|
|Organization:||http://lesours.starynkevitch.net/ - Les Ours|
|Posted-Date:||14 Mar 2003 11:06:26 EST|
>>>>> "Ben" == Ben L Titzer <firstname.lastname@example.org> writes:
Ben> I'm currently developing a compiler in Java for an evolving
Ben> language of my own design. I have completed much of the
Ben> frontend and will be starting on the big fat middle (program
Ben> analysis and optimization that precedes machine specific
Ben> optimizations). I will soon need a backend, and would prefer
Ben> not to embark on my own.
I'm not sure it answers your concern, but you could [also] consider on
of the solutions below:
1. generating JVM bytecodes (there are some Java libraries doing this)
2. generating C code (Mercury, ... compiler implementation do|did
that) -perhaps using several GCC extensions- and compile it with
GNU GCC (or TinyCC see www.tinycc.org on x86).
3. using the C-- compiler and generate C-- code. See
www.cminusminus.org for details. C-- is an intermediate language
specifically designed for compiler writers. The QuickC-- compiler
implementation is free and opensource, and targets several common
4. using the GNU lightning library to generate code. See
http://www.gnu.org/software/lightning/ for more. GNU lightning
library is useful for machine code generation, using a abstract
I wish that your implementation will be (or is already)
opensource. New languages cannot succeed without free implementations.
If you generate code (with solutions 2,3, or 4) you probably will need
to plug in a garbage collector & runtime system. In addition of
Boehm's conservative GC, you might consider using my Qish runtime, an
opensource precise (mostly copying generational) garbage collector
[LGPL license] available on http://freshmeat.net/projects/qish and
http://starynkevitch.net/Basile/qishintro.html the current tar ball
being http://starynkevitch.net/Basile/qish-0.9.tar.gz and Qish aims
precisely machine generated code.
I suggest to not put too much effort on code generation for a new
evolving language design (this entails using solutions similar to
those above). Having a working compiler which generate not very good
code is much better than not having any working compiler!
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
aliases: basile<at>tunes<dot>org = bstarynk<at>nerim<dot>net
8, rue de la Fa´encerie, 92340 Bourg La Reine, France
Return to the
Search the comp.compilers archives again.