This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: patch for _Jv_IsAssignableFrom


Per Bothner wrote:

> I ran into this problem when (x instanceof I) for an interface I
> returned true when it shouldn't have.  It turned out that the
> source->ancestors[source->depth - target->depth] == target test
> was accidentally succeeding, because the source->ancestors array
> was being accessed outside its bounds!

Odd, because source->ancestors should always be NULL for an interface??

> Ok to check in?

Yes, this looks ok to me, although it would be nice to keep the class test
first because that is presumably the most common case. Ultimately, this will
be split up into separate methods (one for interfaces, one for classes) and
the compiler will be smart about which one it calls (or will just inline the
tests).

regards

  [ bryce ]



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]