2014-08-12 17:29:00 -07:00
|
|
|
/*
|
2017-03-15 10:25:37 -04:00
|
|
|
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
|
2014-08-12 17:29:00 -07:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
*
|
|
|
|
* This code is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License version 2 only, as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
* accompanied this code).
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License version
|
|
|
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*
|
|
|
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
* or visit www.oracle.com if you need additional information or have any
|
|
|
|
* questions.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SHARE_VM_CLASSFILE_SYSTEMDICTIONARYSHARED_HPP
|
|
|
|
#define SHARE_VM_CLASSFILE_SYSTEMDICTIONARYSHARED_HPP
|
|
|
|
|
|
|
|
#include "classfile/systemDictionary.hpp"
|
2015-08-18 11:27:23 -07:00
|
|
|
#include "classfile/dictionary.hpp"
|
|
|
|
|
|
|
|
class ClassFileStream;
|
2014-08-12 17:29:00 -07:00
|
|
|
|
|
|
|
class SystemDictionaryShared: public SystemDictionary {
|
|
|
|
public:
|
|
|
|
static void initialize(TRAPS) {}
|
2017-03-15 10:25:37 -04:00
|
|
|
static InstanceKlass* find_or_load_shared_class(Symbol* class_name,
|
|
|
|
Handle class_loader,
|
|
|
|
TRAPS) {
|
|
|
|
return NULL;
|
2014-08-12 17:29:00 -07:00
|
|
|
}
|
|
|
|
static void roots_oops_do(OopClosure* blk) {}
|
|
|
|
static void oops_do(OopClosure* f) {}
|
|
|
|
static bool is_sharing_possible(ClassLoaderData* loader_data) {
|
|
|
|
oop class_loader = loader_data->class_loader();
|
|
|
|
return (class_loader == NULL);
|
|
|
|
}
|
8142968: Module System implementation
Initial integration of JEP 200, JEP 260, JEP 261, and JEP 282
Co-authored-by: Alex Buckley <alex.buckley@oracle.com>
Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com>
Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com>
Co-authored-by: Mandy Chung <mandy.chung@oracle.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: Harold Seigel <harold.seigel@oracle.com>
Co-authored-by: Lois Foltan <lois.foltan@oracle.com>
Co-authored-by: Calvin Cheung <calvin.cheung@oracle.com>
Co-authored-by: Christian Tornqvist <christian.tornqvist@oracle.com>
Co-authored-by: Erik Joelsson <erik.joelsson@oracle.com>
Co-authored-by: George Triantafillou <george.triantafillou@oracle.com>
Co-authored-by: Igor Ignatyev <igor.ignatyev@oracle.com>
Co-authored-by: Ioi Lam <ioi.lam@oracle.com>
Co-authored-by: James Laskey <james.laskey@oracle.com>
Co-authored-by: Jean-Francois Denise <jean-francois.denise@oracle.com>
Co-authored-by: Jiangli Zhou <jiangli.zhou@oracle.com>
Co-authored-by: Markus Gronlund <markus.gronlund@oracle.com>
Co-authored-by: Serguei Spitsyn <serguei.spitsyn@oracle.com>
Co-authored-by: Staffan Larsen <staffan.larsen@oracle.com>
Co-authored-by: Sundararajan Athijegannathan <sundararajan.athijegannathan@oracle.com>
Reviewed-by: acorn, ccheung, coleenp, ctornqvi, dholmes, dsimms, gtriantafill, iklam, jiangli, mgronlun, mseledtsov, cjplummer, sspitsyn, stefank, twisti, hseigel, lfoltan, alanb, mchung, dfazunen
2016-03-17 19:04:01 +00:00
|
|
|
static bool is_shared_class_visible_for_classloader(
|
2017-03-15 10:25:37 -04:00
|
|
|
InstanceKlass* ik,
|
8142968: Module System implementation
Initial integration of JEP 200, JEP 260, JEP 261, and JEP 282
Co-authored-by: Alex Buckley <alex.buckley@oracle.com>
Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com>
Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com>
Co-authored-by: Mandy Chung <mandy.chung@oracle.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: Harold Seigel <harold.seigel@oracle.com>
Co-authored-by: Lois Foltan <lois.foltan@oracle.com>
Co-authored-by: Calvin Cheung <calvin.cheung@oracle.com>
Co-authored-by: Christian Tornqvist <christian.tornqvist@oracle.com>
Co-authored-by: Erik Joelsson <erik.joelsson@oracle.com>
Co-authored-by: George Triantafillou <george.triantafillou@oracle.com>
Co-authored-by: Igor Ignatyev <igor.ignatyev@oracle.com>
Co-authored-by: Ioi Lam <ioi.lam@oracle.com>
Co-authored-by: James Laskey <james.laskey@oracle.com>
Co-authored-by: Jean-Francois Denise <jean-francois.denise@oracle.com>
Co-authored-by: Jiangli Zhou <jiangli.zhou@oracle.com>
Co-authored-by: Markus Gronlund <markus.gronlund@oracle.com>
Co-authored-by: Serguei Spitsyn <serguei.spitsyn@oracle.com>
Co-authored-by: Staffan Larsen <staffan.larsen@oracle.com>
Co-authored-by: Sundararajan Athijegannathan <sundararajan.athijegannathan@oracle.com>
Reviewed-by: acorn, ccheung, coleenp, ctornqvi, dholmes, dsimms, gtriantafill, iklam, jiangli, mgronlun, mseledtsov, cjplummer, sspitsyn, stefank, twisti, hseigel, lfoltan, alanb, mchung, dfazunen
2016-03-17 19:04:01 +00:00
|
|
|
Handle class_loader,
|
2016-06-07 11:39:47 -04:00
|
|
|
const char* pkg_string,
|
8142968: Module System implementation
Initial integration of JEP 200, JEP 260, JEP 261, and JEP 282
Co-authored-by: Alex Buckley <alex.buckley@oracle.com>
Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com>
Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com>
Co-authored-by: Mandy Chung <mandy.chung@oracle.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: Harold Seigel <harold.seigel@oracle.com>
Co-authored-by: Lois Foltan <lois.foltan@oracle.com>
Co-authored-by: Calvin Cheung <calvin.cheung@oracle.com>
Co-authored-by: Christian Tornqvist <christian.tornqvist@oracle.com>
Co-authored-by: Erik Joelsson <erik.joelsson@oracle.com>
Co-authored-by: George Triantafillou <george.triantafillou@oracle.com>
Co-authored-by: Igor Ignatyev <igor.ignatyev@oracle.com>
Co-authored-by: Ioi Lam <ioi.lam@oracle.com>
Co-authored-by: James Laskey <james.laskey@oracle.com>
Co-authored-by: Jean-Francois Denise <jean-francois.denise@oracle.com>
Co-authored-by: Jiangli Zhou <jiangli.zhou@oracle.com>
Co-authored-by: Markus Gronlund <markus.gronlund@oracle.com>
Co-authored-by: Serguei Spitsyn <serguei.spitsyn@oracle.com>
Co-authored-by: Staffan Larsen <staffan.larsen@oracle.com>
Co-authored-by: Sundararajan Athijegannathan <sundararajan.athijegannathan@oracle.com>
Reviewed-by: acorn, ccheung, coleenp, ctornqvi, dholmes, dsimms, gtriantafill, iklam, jiangli, mgronlun, mseledtsov, cjplummer, sspitsyn, stefank, twisti, hseigel, lfoltan, alanb, mchung, dfazunen
2016-03-17 19:04:01 +00:00
|
|
|
Symbol* pkg_name,
|
|
|
|
PackageEntry* pkg_entry,
|
|
|
|
ModuleEntry* mod_entry,
|
|
|
|
TRAPS) {
|
|
|
|
return false;
|
|
|
|
}
|
2015-08-18 11:27:23 -07:00
|
|
|
|
|
|
|
static Klass* dump_time_resolve_super_or_fail(Symbol* child_name,
|
|
|
|
Symbol* class_name,
|
|
|
|
Handle class_loader,
|
|
|
|
Handle protection_domain,
|
|
|
|
bool is_superclass,
|
|
|
|
TRAPS) {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static size_t dictionary_entry_size() {
|
|
|
|
return sizeof(DictionaryEntry);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void init_shared_dictionary_entry(Klass* k, DictionaryEntry* entry) {}
|
2017-07-28 10:48:35 -04:00
|
|
|
static bool is_builtin(DictionaryEntry* entry) { return true; }
|
2015-08-18 11:27:23 -07:00
|
|
|
|
|
|
|
static InstanceKlass* lookup_from_stream(Symbol* class_name,
|
|
|
|
Handle class_loader,
|
|
|
|
Handle protection_domain,
|
2015-12-08 20:04:03 +01:00
|
|
|
const ClassFileStream* st,
|
2015-08-18 11:27:23 -07:00
|
|
|
TRAPS) {
|
|
|
|
return NULL;
|
|
|
|
}
|
2016-04-06 21:53:44 -07:00
|
|
|
|
|
|
|
// The (non-application) CDS implementation supports only classes in the boot
|
|
|
|
// class loader, which ensures that the verification constraints are the same
|
|
|
|
// during archive creation time and runtime. Thus we can do the constraint checks
|
|
|
|
// entirely during archive creation time.
|
|
|
|
static bool add_verification_constraint(Klass* k, Symbol* name,
|
|
|
|
Symbol* from_name, bool from_field_is_protected,
|
|
|
|
bool from_is_array, bool from_is_object) {return false;}
|
|
|
|
static void finalize_verification_constraints() {}
|
2017-03-15 10:25:37 -04:00
|
|
|
static void check_verification_constraints(InstanceKlass* klass,
|
2016-04-06 21:53:44 -07:00
|
|
|
TRAPS) {}
|
2014-08-12 17:29:00 -07:00
|
|
|
};
|
|
|
|
|
2017-08-02 18:06:38 -07:00
|
|
|
class SharedDictionaryEntry : public DictionaryEntry {
|
|
|
|
public:
|
|
|
|
void metaspace_pointers_do(MetaspaceClosure* it) {}
|
|
|
|
};
|
|
|
|
|
2014-08-12 17:29:00 -07:00
|
|
|
#endif // SHARE_VM_CLASSFILE_SYSTEMDICTIONARYSHARED_HPP
|