< prev index next >
src/hotspot/share/oops/instanceKlass.cpp
Print this page
rev 47466 : 8132547: [AOT] support invokedynamic instructions
Reviewed-by: iveresov, kvn
@@ -149,11 +149,11 @@
const int size = InstanceKlass::size(parser.vtable_size(),
parser.itable_size(),
nonstatic_oop_map_size(parser.total_oop_map_count()),
parser.is_interface(),
parser.is_anonymous(),
- should_store_fingerprint());
+ should_store_fingerprint(parser.is_anonymous()));
const Symbol* const class_name = parser.class_name();
assert(class_name != NULL, "invariant");
ClassLoaderData* loader_data = parser.loader_data();
assert(loader_data != NULL, "invariant");
@@ -1955,21 +1955,25 @@
}
return true;
}
-bool InstanceKlass::should_store_fingerprint() {
+bool InstanceKlass::should_store_fingerprint(bool is_anonymous) {
#if INCLUDE_AOT
// We store the fingerprint into the InstanceKlass only in the following 2 cases:
if (CalculateClassFingerprint) {
// (1) We are running AOT to generate a shared library.
return true;
}
if (DumpSharedSpaces) {
// (2) We are running -Xshare:dump to create a shared archive
return true;
}
+ if (UseAOT && is_anonymous) {
+ // (3) We are using AOT code from a shared library and see an anonymous class
+ return true;
+ }
#endif
// In all other cases we might set the _misc_has_passed_fingerprint_check bit,
// but do not store the 64-bit fingerprint to save space.
return false;
< prev index next >