>>>>> "Nic" == Nic Ferrier <[EMAIL PROTECTED]> writes:
>>>> Matthew G Knepley <[EMAIL PROTECTED]> 28-Feb-01 5:23:29 PM
>>>> >>>
>> I believe that the docs are refering to gcj which is a GNU layer
>> on top of gcc that can compile byte code to the GNU IR which is
>> subsequently compiled by gcc. The drawback fothis approach is
>> that all the native functions stuck the in JDK are not part of
>> this process, and thus lots of stuff is not supported (like AWT).
Nic> At the risk of extending this thread beyond it's natural
Nic> lifetime I'd like to make a couple of corrections here:
Sorry but I had to respond to this...
Nic> - GCC now includes Java as a language and the JVM as a
Nic> complilation target (it's not a layer - it's a part of GCC,
Nic> just like Modula-2 support).
The java support with gcc is actually a layer, as indeed
is the modula-2 support. gcc was written in the first place to provide
multiple language support, by providing a relatively clean interface
between the language specific code and the backend assembly production
stuff. At least this is how I understand it.
Nic> - There is an issue with the GCC calling convention, the JVM
Nic> standard is JNI whereas as GCC compiled code uses a convention
Nic> called CNI. This allows better integration between Java and
Nic> other native code.
Nic> It is NOT true to say that lots of stuff is not supported or
Nic> that the native functions in the JDK "are not part of the
Nic> process". GCC uses the GNU-Classpath free implementation of the
Nic> JDK.
Actually it is true....
The point is that you Sun release a full implementation
of the Java api's. Logic would say therefore that if your compiler
(gcj in this case) can compile java, all you would have to do is
compile Sun's code, and you would have the class libraries that you
needed. This fails because the functionality provided by native code
is not specified in the language spec. So the native functions that
would have to provide are specific to the java implementation being
used. The practical upshot of all of this is that gcj requires a
complete API implementation rather than just a (much smaller) set of
native code implementation.
This is explained in detail at....
http://gcc.gnu.org/java/faq.html#2_1
Nic> This does not *yet* include the AWT (it is being developed) or
Nic> Swing but it does include nearlly everything else from Java 2.
Nic> When AWT is finished it will be faster than any other Java
Nic> platforms implementation because of the improved calling
Nic> interface.
This is a premature conclusion I think. Its certainly a hope
but we will have to wait and see.
Phil