mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8227370: Remove SharedPathsMiscInfo
Reviewed-by: ccheung, jiangli
This commit is contained in:
parent
11ca73d744
commit
87eefe2e00
16 changed files with 407 additions and 618 deletions
|
@ -47,17 +47,19 @@ template <typename T> class GrowableArray;
|
|||
class ClassPathEntry : public CHeapObj<mtClass> {
|
||||
private:
|
||||
ClassPathEntry* volatile _next;
|
||||
protected:
|
||||
const char* copy_path(const char*path);
|
||||
public:
|
||||
ClassPathEntry* next() const;
|
||||
virtual ~ClassPathEntry() {}
|
||||
void set_next(ClassPathEntry* next);
|
||||
virtual bool is_modules_image() const = 0;
|
||||
virtual bool is_jar_file() const = 0;
|
||||
virtual bool is_modules_image() const { return false; }
|
||||
virtual bool is_jar_file() const { return false; }
|
||||
// Is this entry created from the "Class-path" attribute from a JAR Manifest?
|
||||
virtual bool from_class_path_attr() const = 0;
|
||||
virtual bool from_class_path_attr() const { return false; }
|
||||
virtual const char* name() const = 0;
|
||||
virtual JImageFile* jimage() const = 0;
|
||||
virtual void close_jimage() = 0;
|
||||
virtual JImageFile* jimage() const { return NULL; }
|
||||
virtual void close_jimage() {}
|
||||
// Constructor
|
||||
ClassPathEntry() : _next(NULL) {}
|
||||
// Attempt to locate file_name through this class path entry.
|
||||
|
@ -73,18 +75,14 @@ class ClassPathDirEntry: public ClassPathEntry {
|
|||
private:
|
||||
const char* _dir; // Name of directory
|
||||
public:
|
||||
bool is_modules_image() const { return false; }
|
||||
bool is_jar_file() const { return false; }
|
||||
bool from_class_path_attr() const { return false; }
|
||||
const char* name() const { return _dir; }
|
||||
JImageFile* jimage() const { return NULL; }
|
||||
void close_jimage() {}
|
||||
ClassPathDirEntry(const char* dir);
|
||||
ClassPathDirEntry(const char* dir) {
|
||||
_dir = copy_path(dir);
|
||||
}
|
||||
virtual ~ClassPathDirEntry() {}
|
||||
ClassFileStream* open_stream(const char* name, TRAPS);
|
||||
};
|
||||
|
||||
|
||||
// Type definitions for zip file and zip file entry
|
||||
typedef void* jzfile;
|
||||
typedef struct {
|
||||
|
@ -104,12 +102,9 @@ class ClassPathZipEntry: public ClassPathEntry {
|
|||
const char* _zip_name; // Name of zip archive
|
||||
bool _from_class_path_attr; // From the "Class-path" attribute of a jar file
|
||||
public:
|
||||
bool is_modules_image() const { return false; }
|
||||
bool is_jar_file() const { return true; }
|
||||
bool from_class_path_attr() const { return _from_class_path_attr; }
|
||||
const char* name() const { return _zip_name; }
|
||||
JImageFile* jimage() const { return NULL; }
|
||||
void close_jimage() {}
|
||||
ClassPathZipEntry(jzfile* zip, const char* zip_name, bool is_boot_append, bool from_class_path_attr);
|
||||
virtual ~ClassPathZipEntry();
|
||||
u1* open_entry(const char* name, jint* filesize, bool nul_terminate, TRAPS);
|
||||
|
@ -126,8 +121,6 @@ private:
|
|||
DEBUG_ONLY(static ClassPathImageEntry* _singleton;)
|
||||
public:
|
||||
bool is_modules_image() const;
|
||||
bool is_jar_file() const { return false; }
|
||||
bool from_class_path_attr() const { return false; }
|
||||
bool is_open() const { return _jimage != NULL; }
|
||||
const char* name() const { return _name == NULL ? "" : _name; }
|
||||
JImageFile* jimage() const { return _jimage; }
|
||||
|
@ -156,8 +149,6 @@ public:
|
|||
void add_to_list(ClassPathEntry* new_entry);
|
||||
};
|
||||
|
||||
class SharedPathsMiscInfo;
|
||||
|
||||
class ClassLoader: AllStatic {
|
||||
public:
|
||||
enum ClassLoaderType {
|
||||
|
@ -230,8 +221,6 @@ class ClassLoader: AllStatic {
|
|||
static ClassPathEntry* _last_append_entry;
|
||||
|
||||
// Info used by CDS
|
||||
CDS_ONLY(static SharedPathsMiscInfo * _shared_paths_misc_info;)
|
||||
|
||||
CDS_ONLY(static ClassPathEntry* _app_classpath_entries;)
|
||||
CDS_ONLY(static ClassPathEntry* _last_app_classpath_entry;)
|
||||
CDS_ONLY(static ClassPathEntry* _module_path_entries;)
|
||||
|
@ -416,10 +405,6 @@ class ClassLoader: AllStatic {
|
|||
}
|
||||
return num_entries;
|
||||
}
|
||||
static void finalize_shared_paths_misc_info();
|
||||
static int get_shared_paths_misc_info_size();
|
||||
static void* get_shared_paths_misc_info();
|
||||
static bool check_shared_paths_misc_info(void* info, int size, bool is_static);
|
||||
static void exit_with_path_failure(const char* error, const char* message);
|
||||
static char* skip_uri_protocol(char* source);
|
||||
static void record_result(InstanceKlass* ik, const ClassFileStream* stream, TRAPS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue