This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: GCJ as a general backend for the GCC ?
- To: Stefan Behnel <stefan dot behnel at web dot de>
- Subject: Re: GCJ as a general backend for the GCC ?
- From: Cedric Berger <cedric at wireless-networks dot com>
- Date: Fri, 06 Apr 2001 08:12:47 -0700
- CC: java at gcc dot gnu dot org
- References: <200104061505.f36F5BN26100@mailgate3.cinetic.de>
Stefan Behnel wrote:
> I'm just curious:
> GCJ compiles Java->bytecode, bytecode->native, Java->native
>
> Whould it be possible to use GCJ in order to compile any of the other languages supported by the GCC to JVM-bytecode? At least, if they don't depend on external libraries or special IO support?
>
> I didn't find any hints to that on the GCJ page.
>
> That way you could write your programs in basically any language and compile them for the JVM. You could even mix different languages which would allow for example the generation of interfaces by a Java-GUI builder and writing the rest of the JVM-application in C, FORTRAN or whatever (I love gcc...)
You cannot compile C->bytecode without extending the bytecode set, because bytecode doesn't
support raw access to memory (read C pointers).
Native java chips (like picojava) adds new bytecodes to support that and other related things.
Cedric