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 ?


>>>>> "Cedric" == Cedric Berger <cedric@wireless-networks.com> writes:

>> Stefan Behnel wrote:

>> 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?

Cedric> You cannot compile C->bytecode without extending the bytecode
Cedric> set, because bytecode doesn't support raw access to memory
Cedric> (read C pointers).

Well, technically you can do it, but you might not like the result.
For instance you could do it by modelling C memory as a big array of
bytes.  A C pointer would be an offset in this array.  (This probably
wouldn't be the best approach; it is just an existence proof.)

In order to do this you'd have to design the model and implement a new
gcc back end for it.  The current bytecode generator works by
generating bytecode directly from trees in gcj.

Tom


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