PR gcj/238

Bryce McKinlay bryce@albatross.co.nz
Wed May 31 04:24:00 GMT 2000


The duplicates occur wherever a method is reachable by more than path.
In the case of java.lang.Object methods, they are reachable twice
because Object is the superclass of both the inner class and its
enclosing class.

Worse, if an inner class is nested more than one level, we end up with
more duplicates for every level of nesting.

The "Search interfaces" part of the function uses a hashtable to keep
track of which classes it has already searched, but the class searching
part does not do this, presumably because it was written before the
inner class stuff was added so enclosing classes wern't an issue. Using
a hashtable would be better from an efficiency point of view, but your
fix works fine as well. Either way we should probibly check something in
soon because its a pretty skanky bug!

regards

  [ bryce ]

Tom Tromey wrote:

> I think this patch fixes PR gcj/238.
>
> The bug seems to be that find_applicable_accessible_methods_list can
> return dplicates.  My patch fixes this by removing duplicates from
> the list before returning.  I'm not completely sure this is the best
> fix, as I don't fully understand why duplicates are being returned in
> the first place.
>
> I'm running regression tests on it right now.
> I can send you the results of this if you want.
>





More information about the Gcc-patches mailing list