This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: Remove exception catching from normal path in Arrays.equals.
Mohan Embar writes:
> Hi Andrew,
>
> > > Let me know if you want me to submit a patch. Otherwise, I'll walk
> > > away from this.
> >
> >Sure, go ahead. I'm a bit nervous about the throw new RuntimeError
> >part because some broken libgcj targets still don't have working
> >backtrace. Perhaps it needs to be conditional on HAVE_BACKTRACE.
>
> I'll submit a patch for this. I thought about the conditional HAVE_BACKTRACE
> too. The crux of the question is: on failure, should the helper method do
> some sort of exception throwing or return a null value? You said previously
> that you didn't like the null checking....
If HAVE_BACKTRACE is not set, do not scan the stack but return null.
If HAVE_BACKTRACE is set, we believe that backtrace() works. So,
throw an exception if we don't find a caller.
I await the firestorm...
Andrew.