equal
deleted
inserted
replaced
67 // Constructor |
67 // Constructor |
68 ClassPathEntry() : _next(NULL) {} |
68 ClassPathEntry() : _next(NULL) {} |
69 // Attempt to locate file_name through this class path entry. |
69 // Attempt to locate file_name through this class path entry. |
70 // Returns a class file parsing stream if successfull. |
70 // Returns a class file parsing stream if successfull. |
71 virtual ClassFileStream* open_stream(const char* name, TRAPS) = 0; |
71 virtual ClassFileStream* open_stream(const char* name, TRAPS) = 0; |
|
72 virtual bool stream_exists(const char* name) = 0; |
72 // Debugging |
73 // Debugging |
73 NOT_PRODUCT(virtual void compile_the_world(Handle loader, TRAPS) = 0;) |
74 NOT_PRODUCT(virtual void compile_the_world(Handle loader, TRAPS) = 0;) |
74 }; |
75 }; |
75 |
76 |
76 class ClassPathDirEntry: public ClassPathEntry { |
77 class ClassPathDirEntry: public ClassPathEntry { |
81 bool is_jar_file() const { return false; } |
82 bool is_jar_file() const { return false; } |
82 const char* name() const { return _dir; } |
83 const char* name() const { return _dir; } |
83 JImageFile* jimage() const { return NULL; } |
84 JImageFile* jimage() const { return NULL; } |
84 ClassPathDirEntry(const char* dir); |
85 ClassPathDirEntry(const char* dir); |
85 ClassFileStream* open_stream(const char* name, TRAPS); |
86 ClassFileStream* open_stream(const char* name, TRAPS); |
|
87 bool stream_exists(const char* name) { return false; } |
86 // Debugging |
88 // Debugging |
87 NOT_PRODUCT(void compile_the_world(Handle loader, TRAPS);) |
89 NOT_PRODUCT(void compile_the_world(Handle loader, TRAPS);) |
88 }; |
90 }; |
89 |
91 |
90 |
92 |
124 u1* open_entry(const char* name, jint* filesize, bool nul_terminate, TRAPS); |
126 u1* open_entry(const char* name, jint* filesize, bool nul_terminate, TRAPS); |
125 u1* open_versioned_entry(const char* name, jint* filesize, TRAPS) NOT_CDS_RETURN_(NULL); |
127 u1* open_versioned_entry(const char* name, jint* filesize, TRAPS) NOT_CDS_RETURN_(NULL); |
126 ClassFileStream* open_stream(const char* name, TRAPS); |
128 ClassFileStream* open_stream(const char* name, TRAPS); |
127 void contents_do(void f(const char* name, void* context), void* context); |
129 void contents_do(void f(const char* name, void* context), void* context); |
128 bool is_multiple_versioned(TRAPS) NOT_CDS_RETURN_(false); |
130 bool is_multiple_versioned(TRAPS) NOT_CDS_RETURN_(false); |
|
131 bool stream_exists(const char* name); |
129 // Debugging |
132 // Debugging |
130 NOT_PRODUCT(void compile_the_world(Handle loader, TRAPS);) |
133 NOT_PRODUCT(void compile_the_world(Handle loader, TRAPS);) |
131 }; |
134 }; |
132 |
135 |
133 |
136 |
143 const char* name() const { return _name == NULL ? "" : _name; } |
146 const char* name() const { return _name == NULL ? "" : _name; } |
144 JImageFile* jimage() const { return _jimage; } |
147 JImageFile* jimage() const { return _jimage; } |
145 ClassPathImageEntry(JImageFile* jimage, const char* name); |
148 ClassPathImageEntry(JImageFile* jimage, const char* name); |
146 ~ClassPathImageEntry(); |
149 ~ClassPathImageEntry(); |
147 ClassFileStream* open_stream(const char* name, TRAPS); |
150 ClassFileStream* open_stream(const char* name, TRAPS); |
|
151 bool stream_exists(const char* name) { return false; } |
148 |
152 |
149 // Debugging |
153 // Debugging |
150 NOT_PRODUCT(void compile_the_world(Handle loader, TRAPS);) |
154 NOT_PRODUCT(void compile_the_world(Handle loader, TRAPS);) |
151 }; |
155 }; |
152 |
156 |
253 // Array of module names associated with the platform class loader |
257 // Array of module names associated with the platform class loader |
254 CDS_ONLY(static GrowableArray<char*>* _platform_modules_array;) |
258 CDS_ONLY(static GrowableArray<char*>* _platform_modules_array;) |
255 |
259 |
256 // Info used by CDS |
260 // Info used by CDS |
257 CDS_ONLY(static SharedPathsMiscInfo * _shared_paths_misc_info;) |
261 CDS_ONLY(static SharedPathsMiscInfo * _shared_paths_misc_info;) |
|
262 CDS_ONLY(static int _num_patch_mod_prefixes;) |
258 |
263 |
259 // Initialization: |
264 // Initialization: |
260 // - setup the boot loader's system class path |
265 // - setup the boot loader's system class path |
261 // - setup the boot loader's patch mod entries, if present |
266 // - setup the boot loader's patch mod entries, if present |
262 // - create the ModuleEntry for java.base |
267 // - create the ModuleEntry for java.base |
425 |
430 |
426 static s2 module_to_classloader(const char* module_name); |
431 static s2 module_to_classloader(const char* module_name); |
427 static void initialize_module_loader_map(JImageFile* jimage); |
432 static void initialize_module_loader_map(JImageFile* jimage); |
428 static s2 classloader_type(Symbol* class_name, ClassPathEntry* e, |
433 static s2 classloader_type(Symbol* class_name, ClassPathEntry* e, |
429 int classpath_index, TRAPS); |
434 int classpath_index, TRAPS); |
|
435 static bool is_in_patch_module(const char* const file_name); |
|
436 static void setup_patch_mod_path(); // Only when -Xshare:dump |
|
437 static int num_patch_mod_prefixes() { return _num_patch_mod_prefixes; } |
430 #endif |
438 #endif |
431 |
439 |
432 static void trace_class_path(const char* msg, const char* name = NULL); |
440 static void trace_class_path(const char* msg, const char* name = NULL); |
433 |
441 |
434 // VM monitoring and management support |
442 // VM monitoring and management support |