src/hotspot/share/classfile/classLoaderExt.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/hotspot/share/classfile/classLoaderExt.hpp	Mon Apr  9 15:32:56 2018
--- new/src/hotspot/share/classfile/classLoaderExt.hpp	Mon Apr  9 15:32:56 2018

*** 24,33 **** --- 24,34 ---- #ifndef SHARE_VM_CLASSFILE_CLASSLOADEREXT_HPP #define SHARE_VM_CLASSFILE_CLASSLOADEREXT_HPP #include "classfile/classLoader.hpp" + #include "classfile/moduleEntry.hpp" #include "utilities/macros.hpp" CDS_ONLY(class SharedPathsMiscInfoExt;) CDS_ONLY(class ClassListParser;)
*** 57,74 **** --- 58,75 ---- Context(const char* class_name, const char* file_name, TRAPS) { _class_name = class_name; _file_name = file_name; #if INCLUDE_CDS if (!DumpSharedSpaces && !UseSharedSpaces) { ! // Must not modify _app_paths_start_index if we're not using CDS. ! assert(_app_paths_start_index == ClassLoaderExt::max_classpath_index, "must be"); ! // Must not modify _app_class_paths_start_index if we're not using CDS. ! assert(_app_class_paths_start_index == ClassLoaderExt::max_classpath_index, "must be"); } #endif } bool should_verify(int classpath_index) { ! CDS_ONLY(return (classpath_index >= _app_paths_start_index);) ! CDS_ONLY(return (classpath_index >= _app_class_paths_start_index);) NOT_CDS(return false;) } void record_result(Symbol* class_name, const s2 classpath_index,
*** 80,104 **** --- 81,111 ---- } ~Context() { #if INCLUDE_CDS if (!DumpSharedSpaces && !UseSharedSpaces) { ! // Must not modify app_paths_start_index if we're not using CDS. ! assert(_app_paths_start_index == ClassLoaderExt::max_classpath_index, "must be"); ! // Must not modify app_class_paths_start_index if we're not using CDS. ! assert(_app_class_paths_start_index == ClassLoaderExt::max_classpath_index, "must be"); } #endif } }; // end ClassLoaderExt::Context private: #if INCLUDE_CDS 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 process_module_table(ModuleEntryTable* met, TRAPS); + static void setup_module_search_path(TRAPS); static SharedPathsMiscInfoExt* shared_paths_misc_info() { return (SharedPathsMiscInfoExt*)_shared_paths_misc_info; } - static jshort _app_paths_start_index; // index of first app JAR in shared classpath entry table + static jshort _app_class_paths_start_index; + // index of first modular JAR in shared modulepath entry table + static jshort _app_module_paths_start_index; + static bool _has_app_classes; static bool _has_platform_classes; #endif public:
*** 114,123 **** --- 121,131 ---- #endif ClassLoader::add_to_boot_append_entries(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 ClassPathEntry* find_classpath_entry_from_cache(const char* path, TRAPS);
*** 135,152 **** --- 143,166 ---- return read_manifest(entry, manifest_size, false, THREAD); } static void finalize_shared_paths_misc_info(); ! static jshort app_paths_start_index() { return _app_paths_start_index; } ! static jshort app_class_paths_start_index() { return _app_class_paths_start_index; } + + static jshort app_module_paths_start_index() { return _app_module_paths_start_index; } static void init_paths_start_index(jshort app_start) { ! _app_paths_start_index = app_start; ! _app_class_paths_start_index = app_start; + } + + static void init_app_module_paths_start_index(jshort module_start) { + _app_module_paths_start_index = module_start; } static bool is_boot_classpath(int classpath_index) { ! return classpath_index < _app_paths_start_index; ! return classpath_index < _app_class_paths_start_index; } static bool has_platform_or_app_classes() { return _has_app_classes || _has_platform_classes; }

src/hotspot/share/classfile/classLoaderExt.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File