On Mon, 20 Nov 2023 21:48:11 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:

>> The method holder is an `InstanceKlass` object which can be retrieved as 
>> `method->method_holder()` (I apologize if I am using not completely correct 
>> terms - this is what I grokked from the sources). And incomplete methods 
>> created by the `ClassParser` from the class data stream will not have the 
>> link to that `InstanceKlass` set up if the `ClassParser` is already having 
>> its `_klass` field set to a non-null value.
>> 
>> If we are talking about clearing any jmetbodIDs associated with an 
>> `InstanceKlass` instance it is not really possible for old method versions 
>> because only the current `InstanceKlass` version has the jmethodID cache 
>> associated with it and it contains jmethodIDs pointing to bot the old and 
>> current methods.
>
> I see, holder is the right word and concept.  So the parameter means 
> has_method_holder, in that the InstanceKlass has been fully parsed at the 
> point of clearing the jmethodIDs.

Can't we just check `method->method_holder()` for null rather than passing in a 
parameter like this?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16662#discussion_r1401396222

Reply via email to