binary compatibility ABI

Andrew Haley aph@redhat.com
Wed Sep 10 11:17:00 GMT 2003


Bryce McKinlay writes:
 > On Wednesday, Sep 10, 2003, at 03:14 Pacific/Auckland, Andrew Haley 
 > wrote:
 > 
 > > I've been giving this some thought.
 > >
 > > It seems to me that the right way to handle access to fields is
 > > automatically to generate access methods for them.  Unlike the
 > > traditional Java access methods getFoo() and putFoo(), these methods
 > > will return the address [Footnote 1] of a field rather than access the
 > > contents of a field.
 > 
 > Hmm. I presume this would be done for static fields only? Member fields 
 > would still require an offset-table approach because the size of a 
 > superclass might change.

But I'm trying to make that an *internal* issue, rather than an
*external* issue.  How a class gets the offset of an instance variable
can be made internal to the implementation of that class.

So, there need be no ABI issues to do with fields, only methods.  That
means we can totally change the way fields are handled without
breaking any ABI.  Within a precompiled library such as libgcj, we
know that a superclass cannot change, and we can take full advantage
of that.

Andrew.



More information about the Java mailing list