Java: Miranda methods fix - PR 12254

Bryce McKinlay bryce@mckinlay.net.nz
Tue Sep 16 08:10:00 GMT 2003


Miranda methods are those defined in an interface and implemented by an 
abstract class that does not explicitly redeclare or define them. A 
recent patch fixed/improved the way these "miranda methods" are 
implemented in GCJ, however it caused a problem which broke libgcj's 
networking code:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12254

The problem seems to be that the order in which methods in an interface 
are seen by add_miranda_methods is dependent on whether that interface 
has previously been "laid out" by layout_class_methods - order matters 
for the current Java ABI. The solution is to call layout_class_methods 
explicitly on super-interfaces prior to checking them for miranda 
methods.

This patch also modifies make_class_data so miranda methods are not 
included in abstract classes reflection data.

OK to commit?

Bryce.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: PR12254.patch.txt
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20030916/fa01aa7b/attachment.txt>
-------------- next part --------------



More information about the Java-patches mailing list