< prev index next >

src/hotspot/share/cds/classPrelinker.hpp

Print this page
*** 36,10 ***
--- 36,13 ---
  
  class ConstantPool;
  class constantPoolHandle;
  class InstanceKlass;
  class Klass;
+ class SerializeClosure;
+ 
+ template <typename T> class GrowableArray;
  
  // ClassPrelinker is used to perform ahead-of-time linking of ConstantPool entries
  // for archived InstanceKlasses.
  //
  // At run time, Java classes are loaded dynamically and may be replaced with JVMTI.

*** 48,26 ***
  //
  // For example, a JVM_CONSTANT_Class reference to a supertype can be safely resolved
  // at dump time, because at run time we will load a class from the CDS archive only
  // if all of its supertypes are loaded from the CDS archive.
  class ClassPrelinker :  AllStatic {
    using ClassesTable = ResourceHashtable<InstanceKlass*, bool, 15889, AnyObj::C_HEAP, mtClassShared> ;
    static ClassesTable* _processed_classes;
-   static ClassesTable* _vm_classes;
- 
-   static void add_one_vm_class(InstanceKlass* ik);
  
  #ifdef ASSERT
    static bool is_in_archivebuilder_buffer(address p);
  #endif
  
-   template <typename T>
-   static bool is_in_archivebuilder_buffer(T p) {
-     return is_in_archivebuilder_buffer((address)(p));
-   }
    static void resolve_string(constantPoolHandle cp, int cp_index, TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
    static bool is_class_resolution_deterministic(InstanceKlass* cp_holder, Klass* resolved_class);
  
    static Klass* find_loaded_class(Thread* current, oop class_loader, Symbol* name);
    static Klass* find_loaded_class(Thread* current, ConstantPool* cp, int class_cp_index);
  
    // fmi = FieldRef/MethodRef/InterfaceMethodRef
--- 51,30 ---
  //
  // For example, a JVM_CONSTANT_Class reference to a supertype can be safely resolved
  // at dump time, because at run time we will load a class from the CDS archive only
  // if all of its supertypes are loaded from the CDS archive.
  class ClassPrelinker :  AllStatic {
+   class PreloadedKlassRecorder;
    using ClassesTable = ResourceHashtable<InstanceKlass*, bool, 15889, AnyObj::C_HEAP, mtClassShared> ;
    static ClassesTable* _processed_classes;
  
  #ifdef ASSERT
+   template <typename T> static bool is_in_archivebuilder_buffer(T p) {
+     return is_in_archivebuilder_buffer((address)(p));
+   }
    static bool is_in_archivebuilder_buffer(address p);
  #endif
  
    static void resolve_string(constantPoolHandle cp, int cp_index, TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
    static bool is_class_resolution_deterministic(InstanceKlass* cp_holder, Klass* resolved_class);
+   static bool is_indy_resolution_deterministic(ConstantPool* cp, int cp_index);
+ 
+   // helper
+   static Klass* resolve_boot_class_or_fail(const char* class_name, TRAPS);
+ 
+   // java/lang/reflect/Proxy caching
+   static void init_dynamic_proxy_cache(TRAPS);
  
    static Klass* find_loaded_class(Thread* current, oop class_loader, Symbol* name);
    static Klass* find_loaded_class(Thread* current, ConstantPool* cp, int class_cp_index);
  
    // fmi = FieldRef/MethodRef/InterfaceMethodRef

*** 77,16 ***
    static void initialize();
    static void dispose();
  
    static void preresolve_class_cp_entries(JavaThread* current, InstanceKlass* ik, GrowableArray<bool>* preresolve_list);
    static void preresolve_field_and_method_cp_entries(JavaThread* current, InstanceKlass* ik, GrowableArray<bool>* preresolve_list);
  
!   // Is this class resolved as part of vmClasses::resolve_all()? If so, these
!   // classes are guatanteed to be loaded at runtime (and cannot be replaced by JVMTI)
!   // when CDS is enabled. Therefore, we can safely keep a direct reference to these
-   // classes.
-   static bool is_vm_class(InstanceKlass* ik);
  
    // Resolve all constant pool entries that are safe to be stored in the
    // CDS archive.
    static void dumptime_resolve_constants(InstanceKlass* ik, TRAPS);
  
--- 84,19 ---
    static void initialize();
    static void dispose();
  
    static void preresolve_class_cp_entries(JavaThread* current, InstanceKlass* ik, GrowableArray<bool>* preresolve_list);
    static void preresolve_field_and_method_cp_entries(JavaThread* current, InstanceKlass* ik, GrowableArray<bool>* preresolve_list);
+   static void preresolve_indy_cp_entries(JavaThread* current, InstanceKlass* ik, GrowableArray<bool>* preresolve_list);
+ 
+   // java/lang/Class$ReflectionData caching
+   static int class_reflection_data_flags(InstanceKlass* ik, TRAPS);
+   static void generate_reflection_data(JavaThread* current, InstanceKlass* ik, int rd_flags);
  
!   // java/lang/reflect/Proxy caching
!   static void trace_dynamic_proxy_class(oop loader, const char* proxy_name, objArrayOop interfaces, int access_flags);
!   static void define_dynamic_proxy_class(Handle loader, Handle proxy_name, Handle interfaces, int access_flags, TRAPS);
  
    // Resolve all constant pool entries that are safe to be stored in the
    // CDS archive.
    static void dumptime_resolve_constants(InstanceKlass* ik, TRAPS);
  
< prev index next >