This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GCJ as a general backend for the GCC ?


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]