8203953: Rename SystemDictionary::load_shared_class(Symbol*, Handle, TRAPS) to load_shared_boot_class().
authorjiangli
Tue, 30 Oct 2018 22:24:04 -0400
changeset 52335 6507eeb6f047
parent 52334 a181612f0715
child 52336 9ae99ef38c16
8203953: Rename SystemDictionary::load_shared_class(Symbol*, Handle, TRAPS) to load_shared_boot_class(). Summary: Rename SystemDictionary::load_shared_class. Reviewed-by: coleenp
src/hotspot/share/classfile/systemDictionary.cpp
src/hotspot/share/classfile/systemDictionary.hpp
--- a/src/hotspot/share/classfile/systemDictionary.cpp	Wed Oct 31 02:10:21 2018 +0100
+++ b/src/hotspot/share/classfile/systemDictionary.cpp	Tue Oct 30 22:24:04 2018 -0400
@@ -1189,20 +1189,15 @@
 }
 
 
-// Load a class from the shared spaces (found through the shared system
-// dictionary).  Force the superclass and all interfaces to be loaded.
-// Update the class definition to include sibling classes and no
-// subclasses (yet).  [Classes in the shared space are not part of the
-// object hierarchy until loaded.]
-
-InstanceKlass* SystemDictionary::load_shared_class(
-                 Symbol* class_name, Handle class_loader, TRAPS) {
+// Load a class for boot loader from the shared spaces (found through
+// the shared system dictionary). Force the super class and all interfaces
+// to be loaded.
+InstanceKlass* SystemDictionary::load_shared_boot_class(Symbol* class_name,
+                                                        TRAPS) {
   InstanceKlass* ik = find_shared_class(class_name);
-  // Make sure we only return the boot class for the NULL classloader.
-  if (ik != NULL &&
-      ik->is_shared_boot_class() && class_loader.is_null()) {
-    Handle protection_domain;
-    return load_shared_class(ik, class_loader, protection_domain, THREAD);
+  // Make sure we only return the boot class.
+  if (ik != NULL && ik->is_shared_boot_class()) {
+    return load_shared_class(ik, Handle(), Handle(), THREAD);
   }
   return NULL;
 }
@@ -1494,7 +1489,7 @@
     {
 #if INCLUDE_CDS
       PerfTraceTime vmtimer(ClassLoader::perf_shared_classload_time());
-      k = load_shared_class(class_name, class_loader, THREAD);
+      k = load_shared_boot_class(class_name, THREAD);
 #endif
     }
 
--- a/src/hotspot/share/classfile/systemDictionary.hpp	Wed Oct 31 02:10:21 2018 +0100
+++ b/src/hotspot/share/classfile/systemDictionary.hpp	Tue Oct 30 22:24:04 2018 -0400
@@ -651,6 +651,8 @@
                                           Handle class_loader,
                                           Handle protection_domain,
                                           TRAPS);
+  static InstanceKlass* load_shared_boot_class(Symbol* class_name,
+                                               TRAPS);
   static InstanceKlass* load_instance_class(Symbol* class_name, Handle class_loader, TRAPS);
   static Handle compute_loader_lock_object(Handle class_loader, TRAPS);
   static void check_loader_lock_contention(Handle loader_lock, TRAPS);
@@ -658,9 +660,6 @@
   static bool is_parallelDefine(Handle class_loader);
 
 public:
-  static InstanceKlass* load_shared_class(Symbol* class_name,
-                                          Handle class_loader,
-                                          TRAPS);
   static bool is_system_class_loader(oop class_loader);
   static bool is_platform_class_loader(oop class_loader);
   static void clear_invoke_method_table();