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