pre-patch to run-time verifier

Tom Tromey tromey@redhat.com
Wed Jan 23 13:07:00 GMT 2002


>>>>> "Per" == Per Bothner <per@bothner.com> writes:

Per> Finally, this also fixes searching interfaces; that
Per> should probably be a separate patch.

I agree.  I think that part is ready to go in right away.

Per> Before checking it in, I'd to clean it up some more by making
Per> verify_fail a method of _Jv_BytecodeVerifier.

Per> A dis-advantage is that I don't know if it is possible to specify
Per> __noreturn__ on a method or what the syntax for that is.
Per> However, I don't think that is an important issue, unless the
Per> __noreturn__ makes a difference for the optimizer.

Actually the problem is that there are non-void functions which call
verify_fail() rather than return.  This gets us a warning from gcc if
it can't tell that verify_fail doesn't return.  For instance see
check_class_constant().

I initially tried to have verify_fail be a method, but ran up against
this.  I suppose it could be handled by changing the logic in the few
places where it matters.  I think there's only a couple.

We'd have to take measurements to see what effect this would have on
performance.  I do know that branches to noreturn function calls are
considered unlikely by the optimizer.  The code for such calls is
pushed to the end of the function.

Thanks for doing this.  This will be a nice improvement.

Tom



More information about the Java-patches mailing list