This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Binary Compatibility
I want to start work on the Binary Compatibility project.
I know that -findirect-dispatch is in the compiler, but I don't know
how well it works in practice.
Before we do anything else, I think we need a Binary Compatibility
Testsuite. This will be the list of tests we need to pass before we
can declare that we are compliant with the JLS Binary Compatibility
requirements. In [1] p7 there is a table that is a list of "all the
binary changes to classes and interfaces specified in Chapter 13 of
the Java language specification." As a start, I suggest there should
be a test case for each of these 45 items. We can run it on the
current compiler and see where we are.
If anyone knows that such a test suite can be obtained somewhere on
the net, please shout.
gcc 3.4 is, I believe, feature frozen. Any major changes will
therefore have to wait until gcc 3.5. In the meantime I suppose we'll
need a development branch for this work.
If we get this right, gcc 3.5 will feature an ABI that is stable for
the long term.
One question: do we think that Binary Compatibility issues will arise
when referencing compiled Java code from CNI C++ code? Personally, I
think that such issues are outside the scope of Java binary
compatibility, so CNI code can continue to reference Java methods as
at present.
Additionally, there is the CNI change that maps
java::lang::foo *obj --> ref<java::lang::foo> obj
I propose that we make this change on the same development branch,
with a view to releasing it in gcc 3.5.
Andrew.
[1] Supporting Binary Compatibility with Static Compilation, Dachuan Yu,
Zhong Shao, Valery Trifonov, 2002.
http://www.usenix.org/publications/library/proceedings/javavm02/yu/yu.pdf