mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-12 03:18:37 +00:00
8368693: Duplicate methods in vmClasses
Reviewed-by: liach, coleenp, dholmes
This commit is contained in:
parent
25abdd85c4
commit
aa6ff45052
@ -2445,7 +2445,7 @@ Method* ClassFileParser::parse_method(const ClassFileStream* const cfs,
|
||||
cfs->skip_u2_fast(method_parameters_length);
|
||||
cfs->skip_u2_fast(method_parameters_length);
|
||||
// ignore this attribute if it cannot be reflected
|
||||
if (!vmClasses::Parameter_klass_loaded())
|
||||
if (!vmClasses::reflect_Parameter_klass_is_loaded())
|
||||
method_parameters_length = -1;
|
||||
} else if (method_attribute_name == vmSymbols::tag_synthetic()) {
|
||||
if (method_attribute_length != 0) {
|
||||
@ -3979,7 +3979,7 @@ void ClassFileParser::set_precomputed_flags(InstanceKlass* ik) {
|
||||
#endif
|
||||
|
||||
// Check if this klass supports the java.lang.Cloneable interface
|
||||
if (vmClasses::Cloneable_klass_loaded()) {
|
||||
if (vmClasses::Cloneable_klass_is_loaded()) {
|
||||
if (ik->is_subtype_of(vmClasses::Cloneable_klass())) {
|
||||
ik->set_is_cloneable();
|
||||
}
|
||||
|
||||
@ -1150,7 +1150,7 @@ void java_lang_Class::create_mirror(Klass* k, Handle class_loader,
|
||||
|
||||
// Class_klass has to be loaded because it is used to allocate
|
||||
// the mirror.
|
||||
if (vmClasses::Class_klass_loaded()) {
|
||||
if (vmClasses::Class_klass_is_loaded()) {
|
||||
Handle mirror;
|
||||
Handle comp_mirror;
|
||||
|
||||
@ -1223,7 +1223,7 @@ bool java_lang_Class::restore_archived_mirror(Klass *k,
|
||||
Handle protection_domain, TRAPS) {
|
||||
// Postpone restoring archived mirror until java.lang.Class is loaded. Please
|
||||
// see more details in vmClasses::resolve_all().
|
||||
if (!vmClasses::Class_klass_loaded() && !CDSConfig::is_using_aot_linked_classes()) {
|
||||
if (!vmClasses::Class_klass_is_loaded() && !CDSConfig::is_using_aot_linked_classes()) {
|
||||
assert(fixup_mirror_list() != nullptr, "fixup_mirror_list not initialized");
|
||||
fixup_mirror_list()->push(k);
|
||||
return true;
|
||||
|
||||
@ -113,7 +113,7 @@ void vmClasses::resolve_until(vmClassID limit_id, vmClassID &start_id, TRAPS) {
|
||||
}
|
||||
|
||||
void vmClasses::resolve_all(TRAPS) {
|
||||
assert(!Object_klass_loaded(), "well-known classes should only be initialized once");
|
||||
assert(!Object_klass_is_loaded(), "well-known classes should only be initialized once");
|
||||
|
||||
// Create the ModuleEntry for java.base. This call needs to be done here,
|
||||
// after vmSymbols::initialize() is called but before any classes are pre-loaded.
|
||||
|
||||
@ -102,12 +102,6 @@ public:
|
||||
assert((uint)t < T_VOID+1, "range check");
|
||||
return check_klass(_box_klasses[t]);
|
||||
}
|
||||
|
||||
static bool Object_klass_loaded() { return is_loaded(VM_CLASS_AT(Object_klass)); }
|
||||
static bool Class_klass_loaded() { return is_loaded(VM_CLASS_AT(Class_klass)); }
|
||||
static bool Cloneable_klass_loaded() { return is_loaded(VM_CLASS_AT(Cloneable_klass)); }
|
||||
static bool Parameter_klass_loaded() { return is_loaded(VM_CLASS_AT(reflect_Parameter_klass)); }
|
||||
static bool ClassLoader_klass_loaded() { return is_loaded(VM_CLASS_AT(ClassLoader_klass)); }
|
||||
};
|
||||
|
||||
#endif // SHARE_CLASSFILE_VMCLASSES_HPP
|
||||
|
||||
@ -504,7 +504,7 @@ void Universe::genesis(TRAPS) {
|
||||
// Since some of the old system object arrays have been converted to
|
||||
// ordinary object arrays, _objectArrayKlass will be loaded when
|
||||
// SystemDictionary::initialize(CHECK); is run. See the extra check
|
||||
// for Object_klass_loaded in objArrayKlassKlass::allocate_objArray_klass_impl.
|
||||
// for Object_klass_is_loaded in ObjArrayKlass::allocate_objArray_klass.
|
||||
{
|
||||
Klass* oak = vmClasses::Object_klass()->array_klass(CHECK);
|
||||
_objectArrayKlass = ObjArrayKlass::cast(oak);
|
||||
@ -593,7 +593,7 @@ void Universe::fixup_mirrors(TRAPS) {
|
||||
// but we cannot do that for classes created before java.lang.Class is loaded. Here we simply
|
||||
// walk over permanent objects created so far (mostly classes) and fixup their mirrors. Note
|
||||
// that the number of objects allocated at this point is very small.
|
||||
assert(vmClasses::Class_klass_loaded(), "java.lang.Class should be loaded");
|
||||
assert(vmClasses::Class_klass_is_loaded(), "java.lang.Class should be loaded");
|
||||
HandleMark hm(THREAD);
|
||||
|
||||
if (!CDSConfig::is_using_archive()) {
|
||||
|
||||
@ -395,7 +395,7 @@ void ConstantPool::restore_unshareable_info(TRAPS) {
|
||||
// Only create the new resolved references array if it hasn't been attempted before
|
||||
if (resolved_references() != nullptr) return;
|
||||
|
||||
if (vmClasses::Object_klass_loaded()) {
|
||||
if (vmClasses::Object_klass_is_loaded()) {
|
||||
ClassLoaderData* loader_data = pool_holder()->class_loader_data();
|
||||
#if INCLUDE_CDS_JAVA_HEAP
|
||||
if (ArchiveHeapLoader::is_in_use() &&
|
||||
|
||||
@ -159,7 +159,7 @@ static inline bool is_class_loader(const Symbol* class_name,
|
||||
return true;
|
||||
}
|
||||
|
||||
if (vmClasses::ClassLoader_klass_loaded()) {
|
||||
if (vmClasses::ClassLoader_klass_is_loaded()) {
|
||||
const Klass* const super_klass = parser.super_klass();
|
||||
if (super_klass != nullptr) {
|
||||
if (super_klass->is_subtype_of(vmClasses::ClassLoader_klass())) {
|
||||
|
||||
@ -78,7 +78,7 @@ ObjArrayKlass* ObjArrayKlass::allocate_objArray_klass(ClassLoaderData* loader_da
|
||||
|
||||
// Eagerly allocate the direct array supertype.
|
||||
Klass* super_klass = nullptr;
|
||||
if (!Universe::is_bootstrapping() || vmClasses::Object_klass_loaded()) {
|
||||
if (!Universe::is_bootstrapping() || vmClasses::Object_klass_is_loaded()) {
|
||||
assert(MultiArray_lock->holds_lock(THREAD), "must hold lock after bootstrapping");
|
||||
Klass* element_super = element_klass->super();
|
||||
if (element_super != nullptr) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user