1 /* |
1 /* |
2 * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
27 #include "classfile/classLoaderData.hpp" |
27 #include "classfile/classLoaderData.hpp" |
28 #include "classfile/javaClasses.hpp" |
28 #include "classfile/javaClasses.hpp" |
29 #include "classfile/moduleEntry.hpp" |
29 #include "classfile/moduleEntry.hpp" |
30 #include "logging/log.hpp" |
30 #include "logging/log.hpp" |
31 #include "memory/resourceArea.hpp" |
31 #include "memory/resourceArea.hpp" |
|
32 #include "oops/oopHandle.inline.hpp" |
32 #include "oops/symbol.hpp" |
33 #include "oops/symbol.hpp" |
33 #include "runtime/handles.inline.hpp" |
34 #include "runtime/handles.inline.hpp" |
34 #include "runtime/safepoint.hpp" |
35 #include "runtime/safepoint.hpp" |
35 #include "trace/traceMacros.hpp" |
36 #include "trace/traceMacros.hpp" |
36 #include "utilities/events.hpp" |
37 #include "utilities/events.hpp" |
37 #include "utilities/growableArray.hpp" |
38 #include "utilities/growableArray.hpp" |
38 #include "utilities/hashtable.inline.hpp" |
39 #include "utilities/hashtable.inline.hpp" |
39 #include "utilities/ostream.hpp" |
40 #include "utilities/ostream.hpp" |
40 |
41 |
41 ModuleEntry* ModuleEntryTable::_javabase_module = NULL; |
42 ModuleEntry* ModuleEntryTable::_javabase_module = NULL; |
|
43 |
|
44 oop ModuleEntry::module() const { return _module.resolve(); } |
42 |
45 |
43 void ModuleEntry::set_location(Symbol* location) { |
46 void ModuleEntry::set_location(Symbol* location) { |
44 if (_location != NULL) { |
47 if (_location != NULL) { |
45 // _location symbol's refcounts are managed by ModuleEntry, |
48 // _location symbol's refcounts are managed by ModuleEntry, |
46 // must decrement the old one before updating. |
49 // must decrement the old one before updating. |