Skip to content
Permalink
Browse files
8268553: [lworld] CI must return secondary mirror when accessing CONS…
…TANT_Class with Q-signature

Reviewed-by: mchung, roland
  • Loading branch information
fparain committed Jun 23, 2021
1 parent 2a7e977 commit 4d064baaecd2986b22cdba9cba1e649f8b934d87
Showing 3 changed files with 14 additions and 1 deletion.
@@ -693,7 +693,15 @@ ciConstant ciEnv::get_constant_by_index_impl(const constantPoolHandle& cpool,
}
assert (klass->is_instance_klass() || klass->is_array_klass(),
"must be an instance or array klass ");
return ciConstant(T_OBJECT, klass->java_mirror());
if (tag.is_unresolved_klass()) {
return ciConstant(T_OBJECT, get_unloaded_klass_mirror(klass));
} else {
if (tag.is_Qdescriptor_klass()) {
return ciConstant(T_OBJECT, klass->as_inline_klass()->val_mirror());
} else {
return ciConstant(T_OBJECT, klass->java_mirror());
}
}
} else if (tag.is_method_type()) {
// must execute Java code to link this CP entry into cache[i].f1
ciSymbol* signature = get_symbol(cpool->method_type_signature_at(index));
@@ -140,3 +140,7 @@ address ciInlineKlass::unpack_handler() const {
InlineKlass* ciInlineKlass::get_InlineKlass() const {
GUARDED_VM_ENTRY(return to_InlineKlass();)
}

ciInstance* ciInlineKlass::val_mirror() {
GUARDED_VM_ENTRY(return CURRENT_ENV->get_instance(to_InlineKlass()->val_mirror());)
}
@@ -90,6 +90,7 @@ class ciInlineKlass : public ciInstanceKlass {
address pack_handler() const;
address unpack_handler() const;
InlineKlass* get_InlineKlass() const;
ciInstance* val_mirror();
};

#endif // SHARE_VM_CI_CIINLINEKLASS_HPP

0 comments on commit 4d064ba

Please sign in to comment.