3848 return VM_RedefineClasses::get_cached_class_file_bytes(_cached_class_file); 3849 } 3850 3851 #if INCLUDE_CDS 3852 JvmtiCachedClassFileData* InstanceKlass::get_archived_class_data() { 3853 if (DumpSharedSpaces) { 3854 return _cached_class_file; 3855 } else { 3856 assert(this->is_shared(), "class should be shared"); 3857 if (MetaspaceShared::is_in_shared_space(_cached_class_file)) { 3858 return _cached_class_file; 3859 } else { 3860 return NULL; 3861 } 3862 } 3863 } 3864 #endif 3865 #endif 3866 3867 #define THROW_DVT_ERROR(s) \ 3868 Exceptions::fthrow(THREAD_AND_LOCATION, vmSymbols::java_lang_InternalError(), \ 3869 "DeriveValueType class '%s' %s", external_name(),(s)); \ 3870 return 3871 3872 void InstanceKlass::create_value_capable_class(Handle class_loader, Handle protection_domain, TRAPS) { 3873 ResourceMark rm(THREAD); 3874 HandleMark hm(THREAD); 3875 3876 if (!EnableMVT) { 3877 return; // Silent fail 3878 } 3879 // Validate VCC... 3880 if (!has_nonstatic_fields()) { 3881 THROW_DVT_ERROR("has no instance fields"); 3882 } 3883 if (is_value()) { 3884 THROW_DVT_ERROR("is already a value type"); 3885 } 3886 if (!access_flags().is_final()) { 3887 THROW_DVT_ERROR("is not a final class"); 3888 } 3889 if (super() != SystemDictionary::Object_klass()) { | 3848 return VM_RedefineClasses::get_cached_class_file_bytes(_cached_class_file); 3849 } 3850 3851 #if INCLUDE_CDS 3852 JvmtiCachedClassFileData* InstanceKlass::get_archived_class_data() { 3853 if (DumpSharedSpaces) { 3854 return _cached_class_file; 3855 } else { 3856 assert(this->is_shared(), "class should be shared"); 3857 if (MetaspaceShared::is_in_shared_space(_cached_class_file)) { 3858 return _cached_class_file; 3859 } else { 3860 return NULL; 3861 } 3862 } 3863 } 3864 #endif 3865 #endif 3866 3867 #define THROW_DVT_ERROR(s) \ 3868 Exceptions::fthrow(THREAD_AND_LOCATION, vmSymbols::java_lang_IncompatibleClassChangeError(), \ 3869 "ValueCapableClass class '%s' %s", external_name(),(s)); \ 3870 return 3871 3872 void InstanceKlass::create_value_capable_class(Handle class_loader, Handle protection_domain, TRAPS) { 3873 ResourceMark rm(THREAD); 3874 HandleMark hm(THREAD); 3875 3876 if (!EnableMVT) { 3877 return; // Silent fail 3878 } 3879 // Validate VCC... 3880 if (!has_nonstatic_fields()) { 3881 THROW_DVT_ERROR("has no instance fields"); 3882 } 3883 if (is_value()) { 3884 THROW_DVT_ERROR("is already a value type"); 3885 } 3886 if (!access_flags().is_final()) { 3887 THROW_DVT_ERROR("is not a final class"); 3888 } 3889 if (super() != SystemDictionary::Object_klass()) { |