This is the mail archive of the
java-patches@sourceware.cygnus.com
mailing list for the Java project.
Re: PATCH: Constant-time interface dispatch, type checking, inlining...
Tom Tromey <tromey@cygnus.com> writes:
> * I notice the JvNew<prim>Array functions no longer have C linkage.
> Does anybody know why they had C linkage in the first place?
> (This probably isn't a real problem.)
Memory is getting weak, but it may have had something to do with JNI,
which needs to work in C code. For normal JNI it shouldn't matter (we
can write the JNI *implementation* in C++, as long it is usable by C code).
However, it might be possible to optimize JNI or use tricks to write
code that is JNI-compatible but optimized for CNI. (Though in that case
the code would be C++.)
A perhaps better reason: We do want to have the compiler emit calls to
_Jv_New<prim>Array, thus those should be extern C. However, I don't
think it matters if JvNew<prim>Array are extern C.
In other words: It is fine to change them to C++ linkage. If we find
a reason they should have C linkage (unlikely), we can change it back.
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/