Wed, 03 Jul 2019 20:42:37 +0800
Merge
iklam@7089 | 1 | /* |
iklam@8497 | 2 | * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. |
iklam@7089 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
iklam@7089 | 4 | * |
iklam@7089 | 5 | * This code is free software; you can redistribute it and/or modify it |
iklam@7089 | 6 | * under the terms of the GNU General Public License version 2 only, as |
iklam@7089 | 7 | * published by the Free Software Foundation. |
iklam@7089 | 8 | * |
iklam@7089 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
iklam@7089 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
iklam@7089 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
iklam@7089 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
iklam@7089 | 13 | * accompanied this code). |
iklam@7089 | 14 | * |
iklam@7089 | 15 | * You should have received a copy of the GNU General Public License version |
iklam@7089 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
iklam@7089 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
iklam@7089 | 18 | * |
iklam@7089 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
iklam@7089 | 20 | * or visit www.oracle.com if you need additional information or have any |
iklam@7089 | 21 | * questions. |
iklam@7089 | 22 | * |
iklam@7089 | 23 | */ |
iklam@7089 | 24 | |
iklam@7089 | 25 | |
iklam@7089 | 26 | #ifndef SHARE_VM_CLASSFILE_SYSTEMDICTIONARYSHARED_HPP |
iklam@7089 | 27 | #define SHARE_VM_CLASSFILE_SYSTEMDICTIONARYSHARED_HPP |
iklam@7089 | 28 | |
iklam@8497 | 29 | #include "classfile/dictionary.hpp" |
iklam@7089 | 30 | #include "classfile/systemDictionary.hpp" |
iklam@7089 | 31 | |
iklam@7089 | 32 | class SystemDictionaryShared: public SystemDictionary { |
iklam@7089 | 33 | public: |
iklam@7089 | 34 | static void initialize(TRAPS) {} |
iklam@7089 | 35 | static instanceKlassHandle find_or_load_shared_class(Symbol* class_name, |
iklam@7089 | 36 | Handle class_loader, |
iklam@7089 | 37 | TRAPS) { |
iklam@7089 | 38 | return instanceKlassHandle(); |
iklam@7089 | 39 | } |
iklam@7089 | 40 | static void roots_oops_do(OopClosure* blk) {} |
iklam@7089 | 41 | static void oops_do(OopClosure* f) {} |
iklam@7089 | 42 | static bool is_sharing_possible(ClassLoaderData* loader_data) { |
iklam@7089 | 43 | oop class_loader = loader_data->class_loader(); |
iklam@7089 | 44 | return (class_loader == NULL); |
iklam@7089 | 45 | } |
iklam@8497 | 46 | |
iklam@8497 | 47 | static size_t dictionary_entry_size() { |
iklam@8497 | 48 | return sizeof(DictionaryEntry); |
iklam@8497 | 49 | } |
iklam@8497 | 50 | static void init_shared_dictionary_entry(Klass* k, DictionaryEntry* entry) {} |
iklam@8497 | 51 | |
iklam@8497 | 52 | // The (non-application) CDS implementation supports only classes in the boot |
iklam@8497 | 53 | // class loader, which ensures that the verification dependencies are the same |
iklam@8497 | 54 | // during archive creation time and runtime. Thus we can do the dependency checks |
iklam@8497 | 55 | // entirely during archive creation time. |
iklam@8497 | 56 | static void add_verification_dependency(Klass* k, Symbol* accessor_clsname, |
iklam@8497 | 57 | Symbol* target_clsname) {} |
iklam@8497 | 58 | static void finalize_verification_dependencies() {} |
iklam@8497 | 59 | static bool check_verification_dependencies(Klass* k, Handle class_loader, |
iklam@8497 | 60 | Handle protection_domain, |
iklam@8497 | 61 | char** message_buffer, TRAPS) {return true;} |
iklam@7089 | 62 | }; |
iklam@7089 | 63 | |
iklam@7089 | 64 | #endif // SHARE_VM_CLASSFILE_SYSTEMDICTIONARYSHARED_HPP |