Skip to content

Commit

Permalink
8288360: CI: ciInstanceKlass::implementor() is not consistent for wel…
Browse files Browse the repository at this point in the history
…l-known classes

Backport-of: 50f99c3208fc9f479cc109fb6e73d262e27026a2
  • Loading branch information
GoeLin committed Jul 3, 2022
1 parent d3354af commit a6c02bd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/hotspot/share/ci/ciInstanceKlass.cpp
Expand Up @@ -638,8 +638,10 @@ bool ciInstanceKlass::is_leaf_type() {
ciInstanceKlass* ciInstanceKlass::implementor() {
ciInstanceKlass* impl = _implementor;
if (impl == NULL) {
// Go into the VM to fetch the implementor.
{
if (is_shared()) {
impl = this; // assume a well-known interface never has a unique implementor
} else {
// Go into the VM to fetch the implementor.
VM_ENTRY_MARK;
MutexLocker ml(Compile_lock);
Klass* k = get_instanceKlass()->implementor();
Expand All @@ -653,9 +655,7 @@ ciInstanceKlass* ciInstanceKlass::implementor() {
}
}
// Memoize this result.
if (!is_shared()) {
_implementor = impl;
}
_implementor = impl;
}
return impl;
}
Expand Down

1 comment on commit a6c02bd

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.