This is the mail archive of the java-discuss@sourceware.cygnus.com 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: libgcj and GNU Classpath


Per> Accessing fields and methods in a convenient way may require
Per> some more magic.  I have some ideas.  One plausible solution
Per> is to use a pre-processor, that can convert code written in a
Per> more abstract format, to emit eithr JNI or CNI code.

This is what was mentioned on the Classpath list -- some kind of Perl
script to convert a language of our design into either JNI or CNI
code.

One idea I had was to have gcjh write out stub classes that look just
like their CNI counterparts but which make JNI calls.  I don't know if
this is really possible to implement or not.  (What about direct field
accesses?)

Per> The ultimate in convenience is to be able to take a JNI file
Per> and "optimize" it to CNI.  This might be easiest and best done
Per> in the C++ compiler.  It might be easier now that G++ can
Per> represent entire functions as trees.

For me the ultimate would be writing in CNI and having it turn into
JNI on the fly, since CNI is easier to write.

Anyway, I definitely think we must explore these possibilities before
falling back to writing everything twice.

Tom

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