mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-16 17:14:41 +02:00
8205327
: Clean up #if INCLUDE_CDS in classLoaderExt.cpp and classLoaderExt.hpp
Clean up #if INCLUDE_CDS in classLoaderExt.* files. Reviewed-by: dholmes
This commit is contained in:
parent
9a06fc3ea7
commit
0c554411b0
2 changed files with 15 additions and 20 deletions
|
@ -55,12 +55,10 @@ bool ClassLoaderExt::_has_app_classes = false;
|
||||||
bool ClassLoaderExt::_has_platform_classes = false;
|
bool ClassLoaderExt::_has_platform_classes = false;
|
||||||
|
|
||||||
void ClassLoaderExt::append_boot_classpath(ClassPathEntry* new_entry) {
|
void ClassLoaderExt::append_boot_classpath(ClassPathEntry* new_entry) {
|
||||||
#if INCLUDE_CDS
|
|
||||||
if (UseSharedSpaces) {
|
if (UseSharedSpaces) {
|
||||||
warning("Sharing is only supported for boot loader classes because bootstrap classpath has been appended");
|
warning("Sharing is only supported for boot loader classes because bootstrap classpath has been appended");
|
||||||
FileMapInfo::current_info()->header()->set_has_platform_or_app_classes(false);
|
FileMapInfo::current_info()->header()->set_has_platform_or_app_classes(false);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
ClassLoader::add_to_boot_append_entries(new_entry);
|
ClassLoader::add_to_boot_append_entries(new_entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,12 +33,17 @@ class ClassListParser;
|
||||||
|
|
||||||
class ClassLoaderExt: public ClassLoader { // AllStatic
|
class ClassLoaderExt: public ClassLoader { // AllStatic
|
||||||
public:
|
public:
|
||||||
|
static bool should_verify(int classpath_index) {
|
||||||
|
CDS_ONLY(return (classpath_index >= _app_class_paths_start_index);)
|
||||||
|
NOT_CDS(return false;)
|
||||||
|
}
|
||||||
|
|
||||||
|
#if INCLUDE_CDS
|
||||||
|
private:
|
||||||
enum SomeConstants {
|
enum SomeConstants {
|
||||||
max_classpath_index = 0x7fff
|
max_classpath_index = 0x7fff
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
|
||||||
#if INCLUDE_CDS
|
|
||||||
static char* get_class_path_attr(const char* jar_path, char* manifest, jint manifest_size);
|
static char* get_class_path_attr(const char* jar_path, char* manifest, jint manifest_size);
|
||||||
static void setup_app_search_path(); // Only when -Xshare:dump
|
static void setup_app_search_path(); // Only when -Xshare:dump
|
||||||
static void process_module_table(ModuleEntryTable* met, TRAPS);
|
static void process_module_table(ModuleEntryTable* met, TRAPS);
|
||||||
|
@ -54,27 +59,19 @@ private:
|
||||||
|
|
||||||
static bool _has_app_classes;
|
static bool _has_app_classes;
|
||||||
static bool _has_platform_classes;
|
static bool _has_platform_classes;
|
||||||
#endif
|
|
||||||
|
|
||||||
public:
|
|
||||||
CDS_ONLY(static void process_jar_manifest(ClassPathEntry* entry, bool check_for_duplicates);)
|
|
||||||
|
|
||||||
static bool should_verify(int classpath_index) {
|
|
||||||
CDS_ONLY(return (classpath_index >= _app_class_paths_start_index);)
|
|
||||||
NOT_CDS(return false;)
|
|
||||||
}
|
|
||||||
// Called by JVMTI code to add boot classpath
|
|
||||||
static void append_boot_classpath(ClassPathEntry* new_entry);
|
|
||||||
|
|
||||||
static void setup_search_paths() NOT_CDS_RETURN;
|
|
||||||
static void setup_module_paths(TRAPS) NOT_CDS_RETURN;
|
|
||||||
|
|
||||||
#if INCLUDE_CDS
|
|
||||||
private:
|
|
||||||
static char* read_manifest(ClassPathEntry* entry, jint *manifest_size, bool clean_text, TRAPS);
|
static char* read_manifest(ClassPathEntry* entry, jint *manifest_size, bool clean_text, TRAPS);
|
||||||
static ClassPathEntry* find_classpath_entry_from_cache(const char* path, TRAPS);
|
static ClassPathEntry* find_classpath_entry_from_cache(const char* path, TRAPS);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
static void process_jar_manifest(ClassPathEntry* entry, bool check_for_duplicates);
|
||||||
|
|
||||||
|
// Called by JVMTI code to add boot classpath
|
||||||
|
static void append_boot_classpath(ClassPathEntry* new_entry);
|
||||||
|
|
||||||
|
static void setup_search_paths();
|
||||||
|
static void setup_module_paths(TRAPS);
|
||||||
|
|
||||||
static char* read_manifest(ClassPathEntry* entry, jint *manifest_size, TRAPS) {
|
static char* read_manifest(ClassPathEntry* entry, jint *manifest_size, TRAPS) {
|
||||||
// Remove all the new-line continuations (which wrap long lines at 72 characters, see
|
// Remove all the new-line continuations (which wrap long lines at 72 characters, see
|
||||||
// http://docs.oracle.com/javase/6/docs/technotes/guides/jar/jar.html#JAR%20Manifest), so
|
// http://docs.oracle.com/javase/6/docs/technotes/guides/jar/jar.html#JAR%20Manifest), so
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue