< prev index next >

src/hotspot/share/classfile/packageEntry.cpp

Print this page
rev 56464 : 8231707: Improve Mutex inlining
Contributed-by: robbin.ehn@oracle.com, claes.redestad@oracle.com


  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/moduleEntry.hpp"
  27 #include "classfile/packageEntry.hpp"
  28 #include "logging/log.hpp"
  29 #include "memory/resourceArea.hpp"
  30 #include "oops/symbol.hpp"
  31 #include "runtime/handles.inline.hpp"
  32 #include "utilities/events.hpp"

  33 #include "utilities/growableArray.hpp"
  34 #include "utilities/hashtable.inline.hpp"
  35 #include "utilities/ostream.hpp"
  36 
  37 // Returns true if this package specifies m as a qualified export, including through an unnamed export
  38 bool PackageEntry::is_qexported_to(ModuleEntry* m) const {
  39   assert(Module_lock->owned_by_self(), "should have the Module_lock");
  40   assert(m != NULL, "No module to lookup in this package's qualified exports list");
  41   if (is_exported_allUnnamed() && !m->is_named()) {
  42     return true;
  43   } else if (!has_qual_exports_list()) {
  44     return false;
  45   } else {
  46     return _qualified_exports->contains(m);
  47   }
  48 }
  49 
  50 // Add a module to the package's qualified export list.
  51 void PackageEntry::add_qexport(ModuleEntry* m) {
  52   assert(Module_lock->owned_by_self(), "should have the Module_lock");




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/moduleEntry.hpp"
  27 #include "classfile/packageEntry.hpp"
  28 #include "logging/log.hpp"
  29 #include "memory/resourceArea.hpp"
  30 #include "oops/symbol.hpp"
  31 #include "runtime/handles.inline.hpp"
  32 #include "runtime/mutexLocker.inline.hpp"
  33 #include "utilities/events.inline.hpp"
  34 #include "utilities/growableArray.hpp"
  35 #include "utilities/hashtable.inline.hpp"
  36 #include "utilities/ostream.hpp"
  37 
  38 // Returns true if this package specifies m as a qualified export, including through an unnamed export
  39 bool PackageEntry::is_qexported_to(ModuleEntry* m) const {
  40   assert(Module_lock->owned_by_self(), "should have the Module_lock");
  41   assert(m != NULL, "No module to lookup in this package's qualified exports list");
  42   if (is_exported_allUnnamed() && !m->is_named()) {
  43     return true;
  44   } else if (!has_qual_exports_list()) {
  45     return false;
  46   } else {
  47     return _qualified_exports->contains(m);
  48   }
  49 }
  50 
  51 // Add a module to the package's qualified export list.
  52 void PackageEntry::add_qexport(ModuleEntry* m) {
  53   assert(Module_lock->owned_by_self(), "should have the Module_lock");


< prev index next >