GCJ as a general backend for the GCC ?

Tom Tromey tromey@redhat.com
Fri Apr 6 08:26:00 GMT 2001


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


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /