Skip to content
Permalink
Browse files
8227467: Better class method invocations
Reviewed-by: thartmann, dholmes, ahgross
  • Loading branch information
Vladimir Ivanov committed Dec 3, 2019
1 parent 72c7b49 commit 2ea157fee1b9c77bf87b5e617b6c2477cfde3e95
Showing 3 changed files with 4 additions and 4 deletions.
@@ -3162,7 +3162,7 @@ oop java_lang_reflect_RecordComponent::create(InstanceKlass* holder, RecordCompo
char* sig = NEW_RESOURCE_ARRAY(char, sig_len);
jio_snprintf(sig, sig_len, "%c%c%s", JVM_SIGNATURE_FUNC, JVM_SIGNATURE_ENDFUNC, type->as_C_string());
TempNewSymbol full_sig = SymbolTable::new_symbol(sig);
accessor_method = holder->find_instance_method(name, full_sig);
accessor_method = holder->find_instance_method(name, full_sig, Klass::find_private);
}

if (accessor_method != NULL) {
@@ -1207,7 +1207,7 @@ class ClassHierarchyWalker {
ClassHierarchyWalker wf(_participants, _num_participants);
Klass* w = wf.find_witness_subtype(k);
if (w != NULL) {
Method* wm = InstanceKlass::cast(w)->find_instance_method(_name, _signature);
Method* wm = InstanceKlass::cast(w)->find_instance_method(_name, _signature, Klass::skip_private);
if (!Dependencies::is_concrete_method(wm, w)) {
// Found a concrete subtype 'w' which does not override abstract method 'm'.
// Bail out because 'm' could be called with 'w' as receiver (leading to an
@@ -610,11 +610,11 @@ class InstanceKlass: public Klass {

// find a local method, but skip static methods
Method* find_instance_method(const Symbol* name, const Symbol* signature,
PrivateLookupMode private_mode = find_private) const;
PrivateLookupMode private_mode) const;
static Method* find_instance_method(const Array<Method*>* methods,
const Symbol* name,
const Symbol* signature,
PrivateLookupMode private_mode = find_private);
PrivateLookupMode private_mode);

// find a local method (returns NULL if not found)
Method* find_local_method(const Symbol* name,

0 comments on commit 2ea157f

Please sign in to comment.