OpenJDK / valhalla / valhalla
changeset 57050:b421bb1eb3db nestmates
8230972: Rename JVM nonFindable usage to hidden
Summary: Rename variable names, parameters, function names, etc. to ...hidden... from ...nonfindable...
Reviewed-by: lfoltan
line wrap: on
line diff
--- a/src/hotspot/share/aot/aotCodeHeap.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/aot/aotCodeHeap.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -1051,7 +1051,7 @@ InstanceKlass* dyno = InstanceKlass::cast(dyno_klass); - if (!dyno->is_nonfindable() && !dyno->is_unsafe_anonymous()) { + if (!dyno->is_hidden() && !dyno->is_unsafe_anonymous()) { if (_klasses_got[dyno_data->_got_index] != dyno) { // compile-time class different from runtime class, fail and deoptimize sweep_dependent_methods(holder_data);
--- a/src/hotspot/share/aot/aotLoader.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/aot/aotLoader.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -43,7 +43,7 @@ #define FOR_ALL_AOT_LIBRARIES(lib) for (GrowableArrayIterator<AOTLib*> lib = libraries()->begin(); lib != libraries()->end(); ++lib) void AOTLoader::load_for_klass(InstanceKlass* ik, Thread* thread) { - if (ik->is_nonfindable() || ik->is_unsafe_anonymous()) { + if (ik->is_hidden() || ik->is_unsafe_anonymous()) { // don't even bother return; } @@ -58,7 +58,7 @@ uint64_t AOTLoader::get_saved_fingerprint(InstanceKlass* ik) { assert(UseAOT, "called only when AOT is enabled"); - if (ik->is_nonfindable() || ik->is_unsafe_anonymous()) { + if (ik->is_hidden() || ik->is_unsafe_anonymous()) { // don't even bother return 0; }
--- a/src/hotspot/share/ci/ciField.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/ci/ciField.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -221,10 +221,10 @@ // Even if general trusting is disabled, trust system-built closures in these packages. if (holder->is_in_package("java/lang/invoke") || holder->is_in_package("sun/invoke")) return true; - // Trust VM nonfindable and unsafe anonymous classes. They are created via Lookup.defineClass or + // Trust VM hidden and unsafe anonymous classes. They are created via Lookup.defineClass or // the private API (jdk.internal.misc.Unsafe) and can't be serialized, so there is no hacking // of finals going on with them. - if (holder->is_nonfindable() || holder->is_unsafe_anonymous()) + if (holder->is_hidden() || holder->is_unsafe_anonymous()) return true; // Trust final fields in all boxed classes if (holder->is_box_klass())
--- a/src/hotspot/share/ci/ciInstanceKlass.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/ci/ciInstanceKlass.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -63,7 +63,7 @@ _has_nonstatic_fields = ik->has_nonstatic_fields(); _has_nonstatic_concrete_methods = ik->has_nonstatic_concrete_methods(); _is_unsafe_anonymous = ik->is_unsafe_anonymous(); - _is_nonfindable = ik->is_nonfindable(); + _is_hidden = ik->is_hidden(); _nonstatic_fields = NULL; // initialized lazily by compute_nonstatic_fields: _has_injected_fields = -1; _implementor = NULL; // we will fill these lazily @@ -76,11 +76,11 @@ oop holder = ik->klass_holder(); if (ik->class_loader_data()->is_shortlived()) { // Though ciInstanceKlass records class loader oop, it's not enough to keep - // VM weak nonfindable and unsafe anonymous classes alive (loader == NULL). Klass holder should + // VM weak hidden and unsafe anonymous classes alive (loader == NULL). Klass holder should // be used instead. It is enough to record a ciObject, since cached elements are never removed // during ciObjectFactory lifetime. ciObjectFactory itself is created for // every compilation and lives for the whole duration of the compilation. - assert(holder != NULL, "holder of nonfindable or unsafe anonymous class is the mirror which is never null"); + assert(holder != NULL, "holder of hidden or unsafe anonymous class is the mirror which is never null"); (void)CURRENT_ENV->get_object(holder); } @@ -124,7 +124,7 @@ _nonstatic_fields = NULL; _has_injected_fields = -1; _is_unsafe_anonymous = false; - _is_nonfindable = false; + _is_hidden = false; _loader = loader; _protection_domain = protection_domain; _is_shared = false;
--- a/src/hotspot/share/ci/ciInstanceKlass.hpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/ci/ciInstanceKlass.hpp Mon Sep 16 14:41:02 2019 +0000 @@ -56,7 +56,7 @@ bool _has_nonstatic_fields; bool _has_nonstatic_concrete_methods; bool _is_unsafe_anonymous; - bool _is_nonfindable; + bool _is_hidden; ciFlags _flags; jint _nonstatic_field_size; @@ -195,9 +195,9 @@ bool is_unsafe_anonymous() { return _is_unsafe_anonymous; } - - bool is_nonfindable() { - return _is_nonfindable; + + bool is_hidden() { + return _is_hidden; } ciInstanceKlass* get_canonical_holder(int offset);
--- a/src/hotspot/share/classfile/classFileParser.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/classfile/classFileParser.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -5539,16 +5539,16 @@ ik->set_this_class_index(_this_class_index); - if (_is_nonfindable || is_unsafe_anonymous()) { + if (_is_hidden || is_unsafe_anonymous()) { // _this_class_index is a CONSTANT_Class entry that refers to this - // nonfindable or anonymous class itself. If this class needs to refer to its own + // hidden or anonymous class itself. If this class needs to refer to its own // methods or fields, it would use a CONSTANT_MethodRef, etc, which would reference - // _this_class_index. However, because this class is nonfindable or anonymous (it's + // _this_class_index. However, because this class is hidden or anonymous (it's // not stored in SystemDictionary), _this_class_index cannot be resolved // with ConstantPool::klass_at_impl, which does a SystemDictionary lookup. // Therefore, we must eagerly resolve _this_class_index now. ik->constants()->klass_at_put(_this_class_index, ik); - ik->set_is_hidden(); + ik->set_is_hidden(); } ik->set_minor_version(_minor_version); @@ -5776,7 +5776,7 @@ Handle protection_domain, const InstanceKlass* unsafe_anonymous_host, GrowableArray<Handle>* cp_patches, - const bool is_nonfindable, + const bool is_hidden, const bool can_access_vm_annotations, Publicity pub_level, TRAPS) : @@ -5785,7 +5785,7 @@ _loader_data(loader_data), _unsafe_anonymous_host(unsafe_anonymous_host), _cp_patches(cp_patches), - _is_nonfindable(is_nonfindable), + _is_hidden(is_hidden), _can_access_vm_annotations(can_access_vm_annotations), _num_patched_klasses(0), _max_num_patched_klasses(0), @@ -6013,7 +6013,7 @@ cp_size, CHECK); _orig_cp_size = cp_size; - if (is_nonfindable()) { // Add a slot for nonfindable class name. + if (is_hidden()) { // Add a slot for hidden class name. assert(_max_num_patched_klasses == 0, "Sanity check"); cp_size++; } else { @@ -6083,26 +6083,26 @@ #ifdef ASSERT // Basic sanity checks - assert(!(_is_nonfindable && (_unsafe_anonymous_host != NULL)), "mutually exclusive variants"); + assert(!(_is_hidden && (_unsafe_anonymous_host != NULL)), "mutually exclusive variants"); if (_unsafe_anonymous_host != NULL) { assert(_class_name == vmSymbols::unknown_class_name(), "A named anonymous class???"); } - if (_is_nonfindable) { - assert(_class_name != vmSymbols::unknown_class_name(), "non-findable classes should have a special name"); + if (_is_hidden) { + assert(_class_name != vmSymbols::unknown_class_name(), "hidden classes should have a special name"); } #endif // Update the _class_name as needed depending on whether this is a named, - // un-named, nonfindable or unsafe-anonymous class. - - if (_is_nonfindable) { + // un-named, hidden or unsafe-anonymous class. + + if (_is_hidden) { _class_name->increment_refcount(); - // Add a Utf8 entry containing the nonfindable name. + // Add a Utf8 entry containing the hidden name. assert(_class_name != NULL, "Unexpected null _class_name"); - int nonfindable_name_index = _orig_cp_size; // this is an extra slot we added - cp->symbol_at_put(nonfindable_name_index, _class_name); + int hidden_index = _orig_cp_size; // this is an extra slot we added + cp->symbol_at_put(hidden_index, _class_name); if (_need_verify) { // Since this name was not in the original constant pool, it didn't get @@ -6115,12 +6115,12 @@ // so extract the existing resolved_klass_index first. CPKlassSlot cp_klass_slot = cp->klass_slot_at(_this_class_index); int resolved_klass_index = cp_klass_slot.resolved_klass_index(); - cp->unresolved_klass_at_put(_this_class_index, nonfindable_name_index, resolved_klass_index); + cp->unresolved_klass_at_put(_this_class_index, hidden_index, resolved_klass_index); assert(cp->klass_slot_at(_this_class_index).name_index() == _orig_cp_size, "Bad name_index"); - // NOTE: !_is_nonfindable does not imply "findable" as it could be an old-style - // "non-findable" unsafe-anonymous class + // NOTE: !_is_hidden does not imply "findable" as it could be an old-style + // "hidden" unsafe-anonymous class // If this is an anonymous class fix up its name if it is in the unnamed // package. Otherwise, throw IAE if it is in a different package than @@ -6176,10 +6176,10 @@ warning("DumpLoadedClassList and CDS are not supported in exploded build"); DumpLoadedClassList = NULL; } else if (SystemDictionaryShared::is_sharing_possible(_loader_data) && - !_is_nonfindable && + !_is_hidden && _unsafe_anonymous_host == NULL) { // Only dump the classes that can be stored into CDS archive. - // Nonfindable and unsafe anonymous classes such as generated LambdaForm classes are also not included. + // Hidden and unsafe anonymous classes such as generated LambdaForm classes are also not included. oop class_loader = _loader_data->class_loader(); ResourceMark rm(THREAD); bool skip = false;
--- a/src/hotspot/share/classfile/classFileParser.hpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/classfile/classFileParser.hpp Mon Sep 16 14:41:02 2019 +0000 @@ -82,7 +82,7 @@ mutable ClassLoaderData* _loader_data; const InstanceKlass* _unsafe_anonymous_host; GrowableArray<Handle>* _cp_patches; // overrides for CP entries - const bool _is_nonfindable; + const bool _is_hidden; const bool _can_access_vm_annotations; int _num_patched_klasses; int _max_num_patched_klasses; @@ -498,7 +498,7 @@ Handle protection_domain, const InstanceKlass* unsafe_anonymous_host, GrowableArray<Handle>* cp_patches, - const bool is_nonfindable, + const bool is_hidden, const bool can_access_vm_annotations, Publicity pub_level, TRAPS); @@ -521,7 +521,7 @@ u2 this_class_index() const { return _this_class_index; } bool is_unsafe_anonymous() const { return _unsafe_anonymous_host != NULL; } - bool is_nonfindable() const { return _is_nonfindable; } + bool is_hidden() const { return _is_hidden; } bool is_interface() const { return _access_flags.is_interface(); } const InstanceKlass* unsafe_anonymous_host() const { return _unsafe_anonymous_host; }
--- a/src/hotspot/share/classfile/classLoader.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/classfile/classLoader.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -1324,7 +1324,7 @@ protection_domain, NULL, // unsafe_anonymous_host NULL, // cp_patches - false, // is_nonfindable + false, // is_hidden false, // can_access_vm_annotations NULL, // dynamic_nest_host Handle(), // classData @@ -1369,8 +1369,8 @@ assert(DumpSharedSpaces || DynamicDumpSharedSpaces, "sanity"); assert(stream != NULL, "sanity"); - if (ik->is_nonfindable() || ik->is_unsafe_anonymous()) { - // We do not archive nonfindable or unsafe anonymous classes. + if (ik->is_hidden() || ik->is_unsafe_anonymous()) { + // We do not archive hidden or unsafe anonymous classes. return; }
--- a/src/hotspot/share/classfile/classLoaderData.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/classfile/classLoaderData.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -152,11 +152,11 @@ } if (!is_shortlived) { - // The holder is initialized later for weak nonfindable and unsafe anonymous classes, + // The holder is initialized later for weak hidden and unsafe anonymous classes, // and before calling anything that call class_loader(). initialize_holder(h_class_loader); - // A ClassLoaderData created solely for an weak nonfindable or unsafe anonymous class should + // A ClassLoaderData created solely for an weak hidden or unsafe anonymous class should // never have a ModuleEntryTable or PackageEntryTable created for it. The defining package // and module for an unsafe anonymous class will be found in its host class. _packages = new PackageEntryTable(PackageEntryTable::_packagetable_entry_size); @@ -292,10 +292,10 @@ } } -// Weak nonfindable and unsafe anonymous classes have their own ClassLoaderData that is marked to keep alive +// Weak hidden and unsafe anonymous classes have their own ClassLoaderData that is marked to keep alive // while the class is being parsed, and if the class appears on the module fixup list. -// Due to the uniqueness that no other class shares the nonfindable or unsafe anonymous class' name or -// ClassLoaderData, no other non-GC thread has knowledge of the nonfindable or unsafe anonymous class while +// Due to the uniqueness that no other class shares the hidden or unsafe anonymous class' name or +// ClassLoaderData, no other non-GC thread has knowledge of the hidden or unsafe anonymous class while // it is being defined, therefore _keep_alive is not volatile or atomic. void ClassLoaderData::inc_keep_alive() { if (is_shortlived()) { @@ -419,13 +419,13 @@ oop to; if (to_cld->is_shortlived()) { - // Just return if a weak nonfindable or unsafe anonymous class is attempting to record a dependency - // to itself. (Note that every weak nonfindable or unsafe anonymous class has its own unique class + // Just return if a weak hidden or unsafe anonymous class is attempting to record a dependency + // to itself. (Note that every weak hidden or unsafe anonymous class has its own unique class // loader data.) if (to_cld == from_cld) { return; } - // Nonfindable and unsafe anonymous class dependencies are through the mirror. + // Hidden and unsafe anonymous class dependencies are through the mirror. to = k->java_mirror(); } else { to = to_cld->class_loader(); @@ -619,7 +619,7 @@ // Unloading support bool ClassLoaderData::is_alive() const { - bool alive = keep_alive() // null class loader and incomplete weak nonfindable or unsafe anonymous klasses. + bool alive = keep_alive() // null class loader and incomplete weak hidden or unsafe anonymous klasses. || (_holder.peek() != NULL); // and not cleaned by the GC weak handle processing. return alive; @@ -731,7 +731,7 @@ // Returns true if the class loader for this class loader data is one of // the 3 builtin (boot application/system or platform) class loaders, // including a user-defined system class loader. Note that if the class -// loader data is for a weak nonfindable or unsafe anonymous class then it may +// loader data is for a weak hidden or unsafe anonymous class then it may // get freed by a GC even if its class loader is one of these loaders. bool ClassLoaderData::is_builtin_class_loader_data() const { return (is_boot_class_loader_data() || @@ -741,7 +741,7 @@ // Returns true if this class loader data is a class loader data // that is not ever freed by a GC. It must be the CLD for one of the builtin -// class loaders and not the CLD for a weak nonfindable or unsafe anonymous class. +// class loaders and not the CLD for a weak hidden or unsafe anonymous class. bool ClassLoaderData::is_permanent_class_loader_data() const { return is_builtin_class_loader_data() && !is_shortlived(); } @@ -878,7 +878,7 @@ } } -// These CLDs are to contain weak nonfindable or unsafe anonymous classes used for JSR292 +// These CLDs are to contain weak hidden or unsafe anonymous classes used for JSR292 ClassLoaderData* ClassLoaderData::shortlived_class_loader_data(Handle loader) { // Add a new class loader data to the graph. return ClassLoaderDataGraph::add(loader, true);
--- a/src/hotspot/share/classfile/classLoaderData.hpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/classfile/classLoaderData.hpp Mon Sep 16 14:41:02 2019 +0000 @@ -118,16 +118,16 @@ Mutex* _metaspace_lock; // Locks the metaspace for allocations and setup. bool _unloading; // true if this class loader goes away bool _is_shortlived; // CLD is dedicated to one class and that class determines the CLDs lifecycle. - // For example, a weak nonfindable or an unsafe anonymous class. + // For example, a weak hidden or an unsafe anonymous class. // Remembered sets support for the oops in the class loader data. bool _modified_oops; // Card Table Equivalent (YC/CMS support) bool _accumulated_modified_oops; // Mod Union Equivalent (CMS support) int _keep_alive; // if this CLD is kept alive. - // Used for weak nonfindable classes, unsafe anonymous classes and the + // Used for weak hidden classes, unsafe anonymous classes and the // boot class loader. _keep_alive does not need to be volatile or - // atomic since there is one unique CLD per weak nonfindable or unsafe anonymous class. + // atomic since there is one unique CLD per weak hidden or unsafe anonymous class. volatile int _claim; // non-zero if claimed, for example during GC traces. // To avoid applying oop closure more than once. @@ -240,15 +240,15 @@ } // Returns true if this class loader data is for the system class loader. - // (Note that the class loader data may be for an weak nonfindable or unsafe anonymous class) + // (Note that the class loader data may be for an weak hidden or unsafe anonymous class) bool is_system_class_loader_data() const; // Returns true if this class loader data is for the platform class loader. - // (Note that the class loader data may be for an weak nonfindable or unsafe anonymous class) + // (Note that the class loader data may be for an weak hidden or unsafe anonymous class) bool is_platform_class_loader_data() const; // Returns true if this class loader data is for the boot class loader. - // (Note that the class loader data may be for an weak nonfindable unsafe anonymous class) + // (Note that the class loader data may be for an weak hidden unsafe anonymous class) inline bool is_boot_class_loader_data() const; bool is_builtin_class_loader_data() const; @@ -269,7 +269,7 @@ return _unloading; } - // Used to refcount an weak nonfindable or unsafe anonymous class's CLD in order to + // Used to refcount an weak hidden or unsafe anonymous class's CLD in order to // indicate their aliveness. void inc_keep_alive(); void dec_keep_alive();
--- a/src/hotspot/share/classfile/classLoaderDataGraph.hpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/classfile/classLoaderDataGraph.hpp Mon Sep 16 14:41:02 2019 +0000 @@ -80,7 +80,7 @@ // Walking classes through the ClassLoaderDataGraph include array classes. It also includes // classes that are allocated but not loaded, classes that have errors, and scratch classes // for redefinition. These classes are removed during the next class unloading. - // Walking the ClassLoaderDataGraph also includes nonfindable and unsafe anonymous classes. + // Walking the ClassLoaderDataGraph also includes hidden and unsafe anonymous classes. static void classes_do(KlassClosure* klass_closure); static void classes_do(void f(Klass* const)); static void methods_do(void f(Method*));
--- a/src/hotspot/share/classfile/classLoaderExt.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/classfile/classLoaderExt.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -292,7 +292,7 @@ protection_domain, NULL, // unsafe_anonymous_host NULL, // cp_patches - false, // is_nonfindable + false, // is_hidden false, // can_access_vm_annotations NULL, // dynamic_nest_host Handle(), // classData
--- a/src/hotspot/share/classfile/classLoaderHierarchyDCmd.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/classfile/classLoaderHierarchyDCmd.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -220,7 +220,7 @@ if (print_classes) { if (_classes != NULL) { for (LoadedClassInfo* lci = _classes; lci; lci = lci->_next) { - // Nonfindable and unsafe anonymous classes should live in the primary CLD of its loader + // Hidden and unsafe anonymous classes should live in the primary CLD of its loader assert(lci->_cld == _cld, "must be"); branchtracker.print(st); @@ -258,7 +258,7 @@ st->print("%*s ", indentation, ""); } st->print("%s", lci->_klass->external_name()); - // For nonfindable and unsafe anonymous classes, also print CLD if verbose. Should be a different one than the primary CLD. + // For hidden and unsafe anonymous classes, also print CLD if verbose. Should be a different one than the primary CLD. assert(lci->_cld != _cld, "must be"); if (verbose) { st->print(" (Loader Data: " PTR_FORMAT ")", p2i(lci->_cld)); @@ -319,14 +319,14 @@ _next = info; } - void add_classes(LoadedClassInfo* first_class, int num_classes, bool is_nonfindable) { - LoadedClassInfo** p_list_to_add_to = is_nonfindable ? &_anon_classes : &_classes; + void add_classes(LoadedClassInfo* first_class, int num_classes, bool is_hidden) { + LoadedClassInfo** p_list_to_add_to = is_hidden ? &_anon_classes : &_classes; // Search tail. while ((*p_list_to_add_to) != NULL) { p_list_to_add_to = &(*p_list_to_add_to)->_next; } *p_list_to_add_to = first_class; - if (is_nonfindable) { + if (is_hidden) { _num_anon_classes += num_classes; } else { _num_classes += num_classes;
--- a/src/hotspot/share/classfile/defaultMethods.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/classfile/defaultMethods.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -862,7 +862,7 @@ ConstantPool* cp = bpool->create_constant_pool(CHECK); if (cp != klass->constants()) { // Copy resolved anonymous class into new constant pool. - if (klass->is_unsafe_anonymous() || klass->is_nonfindable()) { + if (klass->is_unsafe_anonymous() || klass->is_hidden()) { cp->klass_at_put(klass->this_class_index(), klass); } klass->class_loader_data()->add_to_deallocate_list(klass->constants());
--- a/src/hotspot/share/classfile/javaClasses.hpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/classfile/javaClasses.hpp Mon Sep 16 14:41:02 2019 +0000 @@ -1137,7 +1137,7 @@ MN_SEARCH_SUPERCLASSES = 0x00100000, // walk super classes MN_SEARCH_INTERFACES = 0x00200000, // walk implemented interfaces MN_NESTMATE_CLASS = 0x00000001, - MN_NONFINDABLE_CLASS = 0x00000002, + MN_HIDDEN_CLASS = 0x00000002, MN_WEAK_CLASS = 0x00000004, MN_ACCESS_VM_ANNOTATIONS = 0x00100000 };
--- a/src/hotspot/share/classfile/klassFactory.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/classfile/klassFactory.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -85,7 +85,7 @@ protection_domain, NULL, // unsafe_anonymous_host NULL, // cp_patches - false, // is_nonfindable + false, // is_hidden false, // can_access_vm_annotations ClassFileParser::BROADCAST, // publicity level CHECK_NULL); @@ -174,7 +174,7 @@ Handle protection_domain, const InstanceKlass* unsafe_anonymous_host, GrowableArray<Handle>* cp_patches, - const bool is_nonfindable, + const bool is_hidden, const bool can_access_vm_annotations, InstanceKlass* dynamic_nest_host, Handle classData, @@ -193,11 +193,11 @@ // increment counter THREAD->statistical_info().incr_define_class_count(); - assert(!(is_nonfindable && (unsafe_anonymous_host != NULL)), - "nonFindable class has an anonymous host"); + assert(!(is_hidden && (unsafe_anonymous_host != NULL)), + "hidden class has an anonymous host"); - // Skip this processing for VM nonfindable or anonymous classes - if (!is_nonfindable && (unsafe_anonymous_host == NULL)) { + // Skip this processing for VM hidden or anonymous classes + if (!is_hidden && (unsafe_anonymous_host == NULL)) { stream = check_class_file_load_hook(stream, name, loader_data, @@ -212,7 +212,7 @@ protection_domain, unsafe_anonymous_host, cp_patches, - is_nonfindable, + is_hidden, can_access_vm_annotations, ClassFileParser::BROADCAST, // publicity level CHECK_NULL);
--- a/src/hotspot/share/classfile/klassFactory.hpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/classfile/klassFactory.hpp Mon Sep 16 14:41:02 2019 +0000 @@ -74,7 +74,7 @@ Handle protection_domain, const InstanceKlass* unsafe_anonymous_host, GrowableArray<Handle>* cp_patches, - const bool is_nonfindable, + const bool is_hidden, const bool can_access_vm_annotations, InstanceKlass* dynamic_nest_host, Handle classData,
--- a/src/hotspot/share/classfile/systemDictionary.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/classfile/systemDictionary.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -987,7 +987,7 @@ // Note: this method is much like resolve_from_stream, but // does not publish the classes via the SystemDictionary. -// Handles Lookup.defineClass nonfindable, unsafe_DefineAnonymousClass +// Handles Lookup.defineClass hidden, unsafe_DefineAnonymousClass // and redefineclasses. RedefinedClasses do not add to the class hierarchy. InstanceKlass* SystemDictionary::parse_stream(Symbol* class_name, Handle class_loader, @@ -995,8 +995,8 @@ ClassFileStream* st, const InstanceKlass* unsafe_anonymous_host, GrowableArray<Handle>* cp_patches, - const bool is_nonfindable, - const bool is_weaknonfindable, + const bool is_hidden, + const bool is_weakhidden, const bool can_access_vm_annotations, InstanceKlass* dynamic_nest_host, Handle classData, @@ -1011,14 +1011,14 @@ // class loader as the unsafe_anonymous_host. guarantee(oopDesc::equals(unsafe_anonymous_host->class_loader(), class_loader()), "should be the same"); loader_data = ClassLoaderData::shortlived_class_loader_data(class_loader); - } else if (is_nonfindable) { - // - for weak nonfindable class: create a new short-lived CLD whose loader is + } else if (is_hidden) { + // - for weak hidden class: create a new short-lived CLD whose loader is // the Lookup class' loader. - // - for nonfindable class: add the class to the Lookup class' loader's CLD. - if (is_weaknonfindable) { + // - for hidden class: add the class to the Lookup class' loader's CLD. + if (is_weakhidden) { loader_data = ClassLoaderData::shortlived_class_loader_data(class_loader); } else { - // This nonfindable class goes into the regular CLD pool for this loader. + // This hidden class goes into the regular CLD pool for this loader. loader_data = register_loader(class_loader); } } else { @@ -1039,16 +1039,16 @@ protection_domain, unsafe_anonymous_host, cp_patches, - is_nonfindable, + is_hidden, can_access_vm_annotations, dynamic_nest_host, classData, CHECK_NULL); - if ((is_nonfindable || (unsafe_anonymous_host != NULL)) && k != NULL) { - // Weak nonfindable and unsafe anonymous classes must update ClassLoaderData holder + if ((is_hidden || (unsafe_anonymous_host != NULL)) && k != NULL) { + // Weak hidden and unsafe anonymous classes must update ClassLoaderData holder // so that they can be unloaded when the mirror is no longer referenced. - if (is_weaknonfindable || (unsafe_anonymous_host != NULL)) { + if (is_weakhidden || (unsafe_anonymous_host != NULL)) { k->class_loader_data()->initialize_holder(Handle(THREAD, k->java_mirror())); } @@ -1142,7 +1142,7 @@ protection_domain, NULL, // unsafe_anonymous_host NULL, // cp_patches - false, // is_nonfindable + false, // is_hidden false, // can_access_vm_annotations dynamic_nest_host, Handle(), // classData
--- a/src/hotspot/share/classfile/systemDictionary.hpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/classfile/systemDictionary.hpp Mon Sep 16 14:41:02 2019 +0000 @@ -283,8 +283,8 @@ st, NULL, // unsafe_anonymous_host NULL, // cp_patches - false, // is_nonfindable - false, // is_weaknonfindable + false, // is_hidden + false, // is_weakhidden false, // can_access_vm_annotations dynamic_nest_host, Handle(), // classData @@ -296,8 +296,8 @@ ClassFileStream* st, const InstanceKlass* unsafe_anonymous_host, GrowableArray<Handle>* cp_patches, - const bool is_nonfindable, - const bool is_weaknonfindable, + const bool is_hidden, + const bool is_weakhidden, const bool can_access_vm_annotations, InstanceKlass* dynamic_nest_host, Handle classData,
--- a/src/hotspot/share/classfile/systemDictionaryShared.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/classfile/systemDictionaryShared.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -896,7 +896,7 @@ if (!UseSharedSpaces) { return NULL; } - if (class_name == NULL) { // don't do this for nonfindable and unsafe anonymous classes + if (class_name == NULL) { // don't do this for hidden and unsafe anonymous classes return NULL; } if (class_loader.is_null() || @@ -1082,9 +1082,9 @@ } bool SystemDictionaryShared::should_be_excluded(InstanceKlass* k) { - if (k->is_nonfindable()) { - warn_excluded(k, "NonFindable or Unsafe anonymous class"); - return true; // nonfindable and unsafe anonymous classes are not archived, skip + if (k->is_hidden() || k->is_unsafe_anonymous()) { + warn_excluded(k, "Hidden or Unsafe anonymous class"); + return true; // hidden and unsafe anonymous classes are not archived, skip } if (k->is_in_error_state()) { warn_excluded(k, "In error state");
--- a/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -1467,7 +1467,7 @@ pd, NULL, // host klass NULL, // cp_patches - false, // is_nonfindable + false, // is_hidden false, // can_access_vm_annotations ClassFileParser::INTERNAL, // internal visibility THREAD);
--- a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -540,7 +540,6 @@ declare_constant(InstanceKlass::linked) \ declare_constant(InstanceKlass::fully_initialized) \ declare_constant(InstanceKlass::_misc_is_unsafe_anonymous) \ - declare_constant(InstanceKlass::_misc_is_nonfindable) \ \ declare_constant(JumpData::taken_off_set) \ declare_constant(JumpData::displacement_off_set) \
--- a/src/hotspot/share/memory/metaspace.hpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/memory/metaspace.hpp Mon Sep 16 14:41:02 2019 +0000 @@ -248,7 +248,7 @@ // Initialize the first chunk for a Metaspace. Used for // special cases such as the boot class loader, reflection - // class loader and nonfindable class loader. + // class loader and hidden class loader. void initialize_first_chunk(Metaspace::MetaspaceType type, Metaspace::MetadataType mdtype); metaspace::Metachunk* get_initialization_chunk(Metaspace::MetaspaceType type, Metaspace::MetadataType mdtype); @@ -393,7 +393,7 @@ rf_show_loaders = (1 << 0), // Breaks report down by chunk type (small, medium, ...). rf_break_down_by_chunktype = (1 << 1), - // Breaks report down by space type (nonfindable, reflection, ...). + // Breaks report down by space type (hidden, reflection, ...). rf_break_down_by_spacetype = (1 << 2), // Print details about the underlying virtual spaces. rf_show_vslist = (1 << 3),
--- a/src/hotspot/share/memory/metaspace/printCLDMetaspaceInfoClosure.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/memory/metaspace/printCLDMetaspaceInfoClosure.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -104,7 +104,7 @@ _out->print(UINTX_FORMAT_W(4) ": ", _num_loaders); // Print "CLD for [<loader name>,] instance of <loader class name>" - // or "CLD for <weak nonfindable class>, loaded by [<loader name>,] instance of <loader class name>" + // or "CLD for <weak hidden class>, loaded by [<loader name>,] instance of <loader class name>" ResourceMark rm; const char* name = NULL; @@ -129,7 +129,7 @@ } _out->print(":"); if (cld->is_shortlived()) { - _out->print(" <weak nonfindable class>, loaded by"); + _out->print(" <weak hidden class>, loaded by"); } if (name != NULL) { _out->print(" \"%s\"", name);
--- a/src/hotspot/share/memory/metaspace/spaceManager.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/memory/metaspace/spaceManager.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -114,10 +114,10 @@ // After that a medium chunk is preferred. size_t chunk_word_size; - // Special case for nonfindable metadata space. + // Special case for hidden metadata space. // ShortLived metadata space is usually small since it is used for // class loader data's whose life cycle is governed by one class such as a - // weak nonfindable or unsafe anonymous class. The majority within 1K - 2K range and + // weak hidden or unsafe anonymous class. The majority within 1K - 2K range and // rarely about 4K (64-bits JVM). // Instead of jumping to SmallChunk after initial chunk exhausted, keeping allocation // from SpecializeChunk up to _anon_or_delegating_metadata_specialize_chunk_limit (4)
--- a/src/hotspot/share/oops/instanceKlass.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/oops/instanceKlass.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -413,12 +413,13 @@ } InstanceKlass* InstanceKlass::allocate_instance_klass(const ClassFileParser& parser, TRAPS) { + bool is_nonfindable = parser.is_hidden() || parser.is_unsafe_anonymous(); const int size = InstanceKlass::size(parser.vtable_size(), parser.itable_size(), nonstatic_oop_map_size(parser.total_oop_map_count()), parser.is_interface(), - (parser.is_nonfindable() || parser.is_unsafe_anonymous()), - should_store_fingerprint(parser.is_unsafe_anonymous())); + is_nonfindable, + should_store_fingerprint(is_nonfindable)); const Symbol* const class_name = parser.class_name(); assert(class_name != NULL, "invariant"); @@ -491,7 +492,7 @@ set_vtable_length(parser.vtable_size()); set_kind(kind); set_access_flags(parser.access_flags()); - set_is_nonfindable(parser.is_nonfindable()); + if (parser.is_hidden()) set_is_hidden(); set_is_unsafe_anonymous(parser.is_unsafe_anonymous()); set_layout_helper(Klass::instance_layout_helper(parser.layout_size(), false)); @@ -2281,7 +2282,7 @@ return true; } if (UseAOT && is_nonfindable) { - // (3) We are using AOT code from a shared library and see a nonfindable or unsafe anonymous class + // (3) We are using AOT code from a shared library and see a hidden or unsafe anonymous class return true; } #endif @@ -2677,13 +2678,13 @@ return unsafe_anonymous_host()->module(); } - if (is_nonfindable() && + if (is_hidden() && in_unnamed_package() && class_loader_data()->is_shortlived()) { - // For a weak nonfindable class defined to an unnamed package, + // For a weak hidden class defined to an unnamed package, // the short-lived CLD will not have an unnamed module created for it. // Two choices to find the correct ModuleEntry: - // 1. If nonfindable class is within a nest, use nest host's module + // 1. If hidden class is within a nest, use nest host's module // 2. Find the unnamed module off from the class loader // For now option #2 is used since a nest host is not set until // after the instance class is created in jvm_lookup_define_class().
--- a/src/hotspot/share/oops/instanceKlass.hpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/oops/instanceKlass.hpp Mon Sep 16 14:41:02 2019 +0000 @@ -239,8 +239,7 @@ _misc_is_shared_boot_class = 1 << 12, // defining class loader is boot class loader _misc_is_shared_platform_class = 1 << 13, // defining class loader is platform class loader _misc_is_shared_app_class = 1 << 14, // defining class loader is app class loader - _misc_has_resolved_methods = 1 << 15, // resolved methods table entries added for this class - _misc_is_nonfindable = 1 << 16 // is a non findable class, not stored in the SystemDictionary. + _misc_has_resolved_methods = 1 << 15 // resolved methods table entries added for this class }; u2 loader_type_bits() { return _misc_is_shared_boot_class|_misc_is_shared_platform_class|_misc_is_shared_app_class; @@ -667,17 +666,6 @@ } } - bool is_nonfindable() const { - return (_misc_flags & _misc_is_nonfindable) != 0; - } - void set_is_nonfindable(bool value) { - if (value) { - _misc_flags |= _misc_is_nonfindable; - } else { - _misc_flags &= ~_misc_is_nonfindable; - } - } - bool is_contended() const { return (_misc_flags & _misc_is_contended) != 0; } @@ -770,7 +758,7 @@ bool supers_have_passed_fingerprint_checks(); static bool should_store_fingerprint(bool is_nonfindable); - bool should_store_fingerprint() const { return should_store_fingerprint(is_nonfindable() || is_unsafe_anonymous()); } + bool should_store_fingerprint() const { return should_store_fingerprint(is_hidden() || is_unsafe_anonymous()); } bool has_stored_fingerprint() const; uint64_t get_stored_fingerprint() const; void store_fingerprint(uint64_t fingerprint); @@ -1043,20 +1031,20 @@ static int size(int vtable_length, int itable_length, int nonstatic_oop_map_size, - bool is_interface, bool is_nonfindable, bool has_stored_fingerprint) { + bool is_interface, bool is_hidden, bool has_stored_fingerprint) { return align_metadata_size(header_size() + vtable_length + itable_length + nonstatic_oop_map_size + (is_interface ? (int)sizeof(Klass*)/wordSize : 0) + - (is_nonfindable ? (int)sizeof(Klass*)/wordSize : 0) + + (is_hidden ? (int)sizeof(Klass*)/wordSize : 0) + (has_stored_fingerprint ? (int)sizeof(uint64_t*)/wordSize : 0)); } int size() const { return size(vtable_length(), itable_length(), nonstatic_oop_map_size(), is_interface(), - (is_nonfindable() || is_unsafe_anonymous()), + (is_hidden() || is_unsafe_anonymous()), has_stored_fingerprint()); } #if INCLUDE_SERVICES
--- a/src/hotspot/share/oops/instanceMirrorKlass.inline.hpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/oops/instanceMirrorKlass.inline.hpp Mon Sep 16 14:41:02 2019 +0000 @@ -52,7 +52,7 @@ // We'll get NULL for primitive mirrors. if (klass != NULL) { if (klass->is_instance_klass() && klass->class_loader_data()->is_shortlived()) { - // A weak nonfindable or an unsafe anonymous class doesn't have its own class loader, + // A weak hidden or an unsafe anonymous class doesn't have its own class loader, // so when handling the java mirror for the class we need to make sure its class // loader data is claimed, this is done by calling do_cld explicitly. // For non-anonymous classes the call to do_cld is made when the class
--- a/src/hotspot/share/oops/klass.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/oops/klass.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -688,7 +688,7 @@ const char* Klass::external_name() const { if (is_instance_klass()) { const InstanceKlass* ik = static_cast<const InstanceKlass*>(this); - if (ik->is_unsafe_anonymous() || ik->is_nonfindable()) { + if (ik->is_unsafe_anonymous() || ik->is_hidden()) { char addr_buf[20]; jio_snprintf(addr_buf, 20, "/" INTPTR_FORMAT, p2i(ik)); size_t addr_len = strlen(addr_buf);
--- a/src/hotspot/share/oops/method.hpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/oops/method.hpp Mon Sep 16 14:41:02 2019 +0000 @@ -880,7 +880,7 @@ bool is_hidden() const { // ## FIXME: should be set at class parsing time - return method_holder()->is_nonfindable() || (_flags & _hidden) != 0; + return method_holder()->is_hidden() || (_flags & _hidden) != 0; } void set_hidden(bool x) { _flags = x ? (_flags | _hidden) : (_flags & ~_hidden);
--- a/src/hotspot/share/prims/jvm.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/prims/jvm.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -974,14 +974,14 @@ enum { NESTMATE = java_lang_invoke_MemberName::MN_NESTMATE_CLASS, - NONFINDABLE_CLASS = java_lang_invoke_MemberName::MN_NONFINDABLE_CLASS, + HIDDEN_CLASS = java_lang_invoke_MemberName::MN_HIDDEN_CLASS, WEAK_CLASS = java_lang_invoke_MemberName::MN_WEAK_CLASS, ACCESS_VM_ANNOTATIONS = java_lang_invoke_MemberName::MN_ACCESS_VM_ANNOTATIONS }; /* * Define a class with the specified flags that indicates if it's a nestmate, - * not findable, or weakly reachable from class loader. + * hidden, or weakly reachable from class loader. * * Same class may be defined by multiple threads at the same time. * Should the VM keep the classData (the one successfully defined the class) @@ -1002,7 +1002,7 @@ assert(k->is_instance_klass(), "Lookup class must be an instance klass"); jboolean is_nestmate = (flags & NESTMATE) == NESTMATE; - jboolean is_nonfindable = (flags & NONFINDABLE_CLASS) == NONFINDABLE_CLASS; + jboolean is_hidden = (flags & HIDDEN_CLASS) == HIDDEN_CLASS; jboolean is_weak = (flags & WEAK_CLASS) == WEAK_CLASS; jboolean vm_annotations = (flags & ACCESS_VM_ANNOTATIONS) == ACCESS_VM_ANNOTATIONS; @@ -1014,14 +1014,14 @@ host_class = InstanceKlass::cast(k)->nest_host(icce, CHECK_NULL); } - // classData (constant pool patching replacement) is only applicable for nonfindable classes - if (classData != NULL && !is_nonfindable) { - THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), "classData is only applicable for nonfindable classes"); + // classData (constant pool patching replacement) is only applicable for hidden classes + if (classData != NULL && !is_hidden) { + THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), "classData is only applicable for hidden classes"); } - // vm_annotations only allowed for nonfindable classes - if (vm_annotations && !is_nonfindable) { - THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), "vm annotations only allowed for weak nonfindable classes"); + // vm_annotations only allowed for hidden classes + if (vm_annotations && !is_hidden) { + THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), "vm annotations only allowed for weak hidden classes"); } if (log_is_enabled(Info, class, nestmates)) { @@ -1029,7 +1029,7 @@ name, is_nestmate ? "with dynamic nest-host " : "non-nestmate", is_nestmate ? host_class->external_name() : "", - is_nonfindable ? "non-findable" : "findable", + is_hidden ? "hidden" : "not hidden", is_weak ? "weak" : "strong", vm_annotations ? "with vm annotations" : "without vm annotation"); } @@ -1057,7 +1057,7 @@ const char* source = is_nestmate ? host_class->external_name() : "__JVM_LookupDefineClass__"; ClassFileStream st((u1*)buf, len, source, ClassFileStream::verify); - if (!is_nonfindable) { + if (!is_hidden) { k = SystemDictionary::resolve_from_stream(class_name, class_loader, protection_domain, @@ -1068,7 +1068,7 @@ if (log_is_enabled(Debug, class, resolve) && k != NULL) { trace_class_resolution(k); } - } else { //nonfindable + } else { //hidden Handle classData_h(THREAD, JNIHandles::resolve(classData)); k = SystemDictionary::parse_stream(class_name, class_loader, @@ -1076,17 +1076,17 @@ &st, NULL, // unsafe_anonymous_host NULL, // cp_patches - is_nonfindable, + is_hidden, is_weak, vm_annotations, host_class, classData_h, CHECK_NULL); if (k == NULL) { - THROW_MSG_0(vmSymbols::java_lang_Error(), "Failure to define a nonfindable class"); + THROW_MSG_0(vmSymbols::java_lang_Error(), "Failure to define a hidden class"); } - // The nonfindable class loader data has been artificially been kept alive to + // The hidden class loader data has been artificially been kept alive to // this point. The mirror and any instances of this class have to keep // it alive afterwards. InstanceKlass::cast(k)->class_loader_data()->dec_keep_alive(); @@ -1100,7 +1100,7 @@ module_name, ik->external_name(), host_class->external_name(), - ik->is_nonfindable() ? "is non-findable" : "is findable"); + ik->is_hidden() ? "is hidden" : "is not hidden"); } InstanceKlass* ik = InstanceKlass::cast(k); @@ -1127,7 +1127,7 @@ * buf: class bytes * len: length of class bytes * pd: protection domain - * init: initialize the class + * init: initialize the class * flags: properties of the class * classData: private static pre-initialized field */ @@ -1573,7 +1573,7 @@ = InstanceKlass::cast(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(ofClass)) )->compute_enclosing_class(&inner_is_member, CHECK_NULL); if (outer_klass == NULL) return NULL; // already a top-level class - if (!inner_is_member) return NULL; // a nonfindable or unsafe anonymous class (inside a method) + if (!inner_is_member) return NULL; // a hidden or unsafe anonymous class (inside a method) return (jclass) JNIHandles::make_local(env, outer_klass->java_mirror()); } JVM_END
--- a/src/hotspot/share/prims/jvmtiRedefineClasses.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/prims/jvmtiRedefineClasses.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -145,7 +145,7 @@ } oop mirror = JNIHandles::resolve_non_null(_class_defs[i].klass); - // classes for primitives, arrays, nonfindable and vm unsafe anonymous classes + // classes for primitives, arrays, hidden and vm unsafe anonymous classes // cannot be redefined. Check here so following code can assume these classes // are InstanceKlass. if (!is_modifiable_class(mirror)) { @@ -289,8 +289,8 @@ return false; } - // Cannot redefine or retransform a nonfindable or an unsafe anonymous class. - if (InstanceKlass::cast(k)->is_nonfindable() || + // Cannot redefine or retransform a hidden or an unsafe anonymous class. + if (InstanceKlass::cast(k)->is_hidden() || InstanceKlass::cast(k)->is_unsafe_anonymous()) { return false; }
--- a/src/hotspot/share/prims/methodHandles.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/prims/methodHandles.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -1155,7 +1155,7 @@ template(java_lang_invoke_MemberName,MN_REFERENCE_KIND_SHIFT) \ template(java_lang_invoke_MemberName,MN_REFERENCE_KIND_MASK) \ template(java_lang_invoke_MemberName,MN_NESTMATE_CLASS) \ - template(java_lang_invoke_MemberName,MN_NONFINDABLE_CLASS) \ + template(java_lang_invoke_MemberName,MN_HIDDEN_CLASS) \ template(java_lang_invoke_MemberName,MN_WEAK_CLASS) \ template(java_lang_invoke_MemberName,MN_ACCESS_VM_ANNOTATIONS) \ /*end*/
--- a/src/hotspot/share/prims/unsafe.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/prims/unsafe.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -855,10 +855,10 @@ &st, InstanceKlass::cast(host_klass), cp_patches, - false, // is_nonfindable + false, // is_hidden false, // is_weak false, // can_access_vm_annotations - NULL, // dynamic_nest_host + NULL, // dynamic_nest_host Handle(), // classData CHECK_NULL); if (anonk == NULL) {
--- a/src/hotspot/share/runtime/reflection.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/runtime/reflection.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -707,7 +707,7 @@ // Checks that the 'outer' klass has declared 'inner' as being an inner klass. If not, // throw an incompatible class change exception // If inner_is_member, require the inner to be a member of the outer. -// If !inner_is_member, require the inner to be a local or anonymous class (a non-member). +// If !inner_is_member, require the inner to be hidden or unsafe anonymous (non-members). // Caller is responsible for figuring out in advance which case must be true. void Reflection::check_for_inner_class(const InstanceKlass* outer, const InstanceKlass* inner, bool inner_is_member, TRAPS) {
--- a/src/hotspot/share/runtime/vmStructs.cpp Fri Sep 13 08:13:10 2019 -0700 +++ b/src/hotspot/share/runtime/vmStructs.cpp Mon Sep 16 14:41:02 2019 +0000 @@ -2306,7 +2306,6 @@ declare_constant(InstanceKlass::_misc_is_shared_boot_class) \ declare_constant(InstanceKlass::_misc_is_shared_platform_class) \ declare_constant(InstanceKlass::_misc_is_shared_app_class) \ - declare_constant(InstanceKlass::_misc_is_nonfindable) \ \ /*********************************/ \ /* Symbol* - symbol max length */ \