classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Miranda methods again (Was: compatibility with jikes ?)


From: Mark Wielaard
Subject: Miranda methods again (Was: compatibility with jikes ?)
Date: 01 Mar 2003 12:11:01 +0100

Hi (CC classpath mailinglist),

On Thu, 2003-02-27 at 17:25, Tom Tromey wrote:
> >>>>> "Michael" == Michael Koch <address@hidden> writes:
> 
> Michael> java.net.DatagramSocketImpl.getOption()
> Michael> java.net.DatagramSocketImpl.setOption()
> Michael> java.net.SocketImpl.getOption()
> Michael> java.net.SocketImpl.setOption()
> 
> Michael> They came in via a merge with classpath long time ago. GCJ
> Michael> dont need them. They are only there to make these classes
> Michael> compilable with jikes (in classpath tree).
> 
> Michael> Should we really keep them in the libgcj tree for jikes
> Michael> compatibility or better remove them because we dont need them
> Michael> ?
> 
> Actually the comment says they are there to work around a gcj bug.
>
> This may be one of those bugs that only shows up if you compile a lot
> of java files with one gcj command.  Though it does look like a
> classic instance of the Miranda method problem, so I'm not entirely
> sure why we wouldn't need this.

Actually they are workaround for VMs (or compilers) that cannot handle
miranda methods not being generated for abstract classes. So they help
when glibj.jar is generated by gcj (or a recent jikes) and used with a
VM that doesn't handle missing Miranda methods yet.

I just saw the message about Miranda methods missing from the X509CRL
and X509Certificate classes for the X509Extension interface. That is a
similar case.

I vote that we add the Miranda methods explicitly to the abstract
classes in Classpath that need them. If nobody objects then I will go
through the Classpath source and add them (with explicit comments) to
any abstract class that implements an interface but doesn't redeclare
all interface methods (japi can help here since it checks for declared
methods in classes, not inherited methods).

The reason is that "modern" compilers like jikes (when used with -target
1.4) no longer generate them and buggy compilers like gcj -C never
generated them. But not having those methods for the standard classes
now makes the serialisation different (depends on Declared Methods) and
breaks "buggy" VMs (that is almost all VMs since till very recently they
all depended on the compiler generating these Miranda methods).

Cheers,

Mark





reply via email to

[Prev in Thread] Current Thread [Next in Thread]