RFR: 8200238: Reduce number of exceptions created when calling MemberName$Factory::resolveOrNull

David Holmes david.holmes at oracle.com
Tue Mar 27 00:03:41 UTC 2018

On 26/03/2018 11:31 PM, Claes Redestad wrote:
> On 2018-03-26 15:16, David Holmes wrote:
>> MethodHandles::resolve_MemberName doesn't "catch" exceptions from 
>> LinkResolver. They remain pending and will be thrown later unless 
>> replaced with a different exception - which sounds like what happens 
>> from your description. 
> This doesn't really jive with experience: returning NULL without any 
> MethodHandles::resolve_MemberName does not mean the exception is later 
> thrown, rather a null is returned from MHN::resolve.

If there is a pending exception then it will be rethrown as soon as we 
hit code that checks for pending exceptions. If it is not rethrown then 
something else is clearing it.

> I've removed the CLEAR_PENDING_EXCEPTIONS I added experimentally from 
> this webrev, as this might be subtly changing semantics of the 
> resolveOrFail case.

Okay ... but I'm not sure how to combine this with your responses to 
Karen. ??


> /Claes

More information about the hotspot-runtime-dev mailing list