30 #include "runtime/handles.inline.hpp" |
30 #include "runtime/handles.inline.hpp" |
31 #include "trace/traceMacros.hpp" |
31 #include "trace/traceMacros.hpp" |
32 #include "utilities/events.hpp" |
32 #include "utilities/events.hpp" |
33 #include "utilities/growableArray.hpp" |
33 #include "utilities/growableArray.hpp" |
34 #include "utilities/hashtable.inline.hpp" |
34 #include "utilities/hashtable.inline.hpp" |
|
35 #include "utilities/ostream.hpp" |
35 |
36 |
36 // Return true if this package is exported to m. |
37 // Return true if this package is exported to m. |
37 bool PackageEntry::is_qexported_to(ModuleEntry* m) const { |
38 bool PackageEntry::is_qexported_to(ModuleEntry* m) const { |
38 assert(m != NULL, "No module to lookup in this package's qualified exports list"); |
39 assert(m != NULL, "No module to lookup in this package's qualified exports list"); |
39 MutexLocker m1(Module_lock); |
40 MutexLocker m1(Module_lock); |
263 } |
264 } |
264 } |
265 } |
265 } |
266 } |
266 } |
267 } |
267 |
268 |
268 #ifndef PRODUCT |
269 void PackageEntryTable::print(outputStream* st) { |
269 void PackageEntryTable::print() { |
270 st->print_cr("Package Entry Table (table_size=%d, entries=%d)", |
270 tty->print_cr("Package Entry Table (table_size=%d, entries=%d)", |
271 table_size(), number_of_entries()); |
271 table_size(), number_of_entries()); |
|
272 for (int i = 0; i < table_size(); i++) { |
272 for (int i = 0; i < table_size(); i++) { |
273 for (PackageEntry* probe = bucket(i); |
273 for (PackageEntry* probe = bucket(i); |
274 probe != NULL; |
274 probe != NULL; |
275 probe = probe->next()) { |
275 probe = probe->next()) { |
276 probe->print(); |
276 probe->print(st); |
277 } |
277 } |
278 } |
278 } |
279 } |
279 } |
280 |
280 |
281 void PackageEntry::print() { |
281 void PackageEntry::print(outputStream* st) { |
282 ResourceMark rm; |
282 ResourceMark rm; |
283 tty->print_cr("package entry "PTR_FORMAT" name %s module %s classpath_index " |
283 st->print_cr("package entry "PTR_FORMAT" name %s module %s classpath_index " |
284 INT32_FORMAT " is_exported %d is_exported_allUnnamed %d " "next "PTR_FORMAT, |
284 INT32_FORMAT " is_exported %d is_exported_allUnnamed %d " "next "PTR_FORMAT, |
285 p2i(this), name()->as_C_string(), |
285 p2i(this), name()->as_C_string(), |
286 (module()->is_named() ? module()->name()->as_C_string() : UNNAMED_MODULE), |
286 (module()->is_named() ? module()->name()->as_C_string() : UNNAMED_MODULE), |
287 _classpath_index, _is_exported, _is_exported_allUnnamed, p2i(next())); |
287 _classpath_index, _is_exported, _is_exported_allUnnamed, p2i(next())); |
288 } |
288 } |
289 #endif |
|
290 |
289 |
291 void PackageEntryTable::verify() { |
290 void PackageEntryTable::verify() { |
292 int element_count = 0; |
291 int element_count = 0; |
293 for (int index = 0; index < table_size(); index++) { |
292 for (int index = 0; index < table_size(); index++) { |
294 for (PackageEntry* probe = bucket(index); |
293 for (PackageEntry* probe = bucket(index); |