-
Notifications
You must be signed in to change notification settings - Fork 777
Remove Implicit creation work #22975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -230,10 +230,6 @@ ClassFileOracle::ClassFileOracle(BufferManager *bufferManager, J9CfrClassFile *c | |
| _hasNonStaticSynchronizedMethod(false), | ||
| _loadableDescriptorsAttribute(NULL), | ||
| #endif /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */ | ||
| #if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) | ||
| _hasImplicitCreationAttribute(false), | ||
| _implicitCreationFlags(0), | ||
| #endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */ | ||
| _recordComponentCount(0), | ||
| _permittedSubclassesAttribute(NULL), | ||
| _isSealed(false), | ||
|
|
@@ -560,9 +556,6 @@ ClassFileOracle::walkAttributes() | |
| } | ||
| knownAnnotations = addAnnotationBit(knownAnnotations, UNMODIFIABLE_ANNOTATION); | ||
| knownAnnotations = addAnnotationBit(knownAnnotations, VALUEBASED_ANNOTATION); | ||
| #if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) | ||
| knownAnnotations = addAnnotationBit(knownAnnotations, LOOSELYCONSISTENTVALUE_ANNOTATION); | ||
| #endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */ | ||
| _annotationsAttribute = (J9CfrAttributeRuntimeVisibleAnnotations *)attrib; | ||
| if (0 == _annotationsAttribute->rawDataLength) { | ||
| UDATA foundAnnotations = walkAnnotations(_annotationsAttribute->numberOfAnnotations, _annotationsAttribute->annotations, knownAnnotations); | ||
|
|
@@ -575,12 +568,6 @@ ClassFileOracle::walkAttributes() | |
| if (containsKnownAnnotation(foundAnnotations, VALUEBASED_ANNOTATION)) { | ||
| _isClassValueBased = true; | ||
| } | ||
| #if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) | ||
| if (containsKnownAnnotation(foundAnnotations, LOOSELYCONSISTENTVALUE_ANNOTATION)) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can remove all the references to LOOSELYCONSISTENTVALUE_ANNOTATION as well since we aren't doing anything with it right now. |
||
| _hasImplicitCreationAttribute = true; | ||
| _implicitCreationFlags |= J9AccImplicitCreateNonAtomic; | ||
| } | ||
| #endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */ | ||
| } | ||
| break; | ||
| } | ||
|
|
@@ -633,13 +620,6 @@ ClassFileOracle::walkAttributes() | |
| break; | ||
| } | ||
| #endif /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */ | ||
| #if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) | ||
| case CFR_ATTRIBUTE_ImplicitCreation: { | ||
| _hasImplicitCreationAttribute = true; | ||
| _implicitCreationFlags = ((J9CfrAttributeImplicitCreation *)attrib)->implicitCreationFlags; | ||
| break; | ||
| } | ||
| #endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */ | ||
| #if JAVA_SPEC_VERSION >= 11 | ||
| case CFR_ATTRIBUTE_NestMembers: | ||
| /* ignore CFR_ATTRIBUTE_NestMembers for hidden classes, as the nest members never know the name of hidden classes */ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,7 +68,6 @@ DECLARE_UTF8_ATTRIBUTE_NAME(PERMITTED_SUBCLASSES, "PermittedSubclasses"); | |
| DECLARE_UTF8_ATTRIBUTE_NAME(LOADABLEDESCRIPTORS, "LoadableDescriptors"); | ||
| #endif /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */ | ||
| #if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) | ||
| DECLARE_UTF8_ATTRIBUTE_NAME(IMPLICITCREATION, "ImplicitCreation"); | ||
| DECLARE_UTF8_ATTRIBUTE_NAME(NULLRESTRICTED, "NullRestricted"); | ||
| #endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */ | ||
| #if JAVA_SPEC_VERSION >= 11 | ||
|
|
@@ -129,13 +128,6 @@ ClassFileWriter::analyzeROMClass() | |
| } | ||
| } | ||
| #endif /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */ | ||
| #if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) | ||
| if (J9_ARE_ALL_BITS_SET(_romClass->optionalFlags, J9_ROMCLASS_OPTINFO_IMPLICITCREATION_ATTRIBUTE)) { | ||
| U_32 implicitCreationFlags = (U_32)getImplicitCreationFlags(_romClass); | ||
| addEntry((void*) &IMPLICITCREATION, 0, CFR_CONSTANT_Utf8); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove the IMPLICITCREATION definition in line 71. |
||
| addEntry(&implicitCreationFlags, 0, CFR_CONSTANT_Integer); | ||
| } | ||
| #endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */ | ||
| J9EnclosingObject * enclosingObject = getEnclosingMethodForROMClass(_javaVM, NULL, _romClass); | ||
| J9UTF8 * genericSignature = getGenericSignatureForROMClass(_javaVM, NULL, _romClass); | ||
| J9UTF8 * sourceFileName = getSourceFileNameForROMClass(_javaVM, NULL, _romClass); | ||
|
|
@@ -1048,11 +1040,6 @@ ClassFileWriter::writeAttributes() | |
| attributesCount += 1; | ||
| } | ||
| #endif /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */ | ||
| #if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) | ||
| if (J9_ARE_ALL_BITS_SET(_romClass->optionalFlags, J9_ROMCLASS_OPTINFO_IMPLICITCREATION_ATTRIBUTE)) { | ||
| attributesCount += 1; | ||
| } | ||
| #endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */ | ||
| writeU16(attributesCount); | ||
|
|
||
| if ((0 != _romClass->innerClassCount) | ||
|
|
@@ -1237,13 +1224,6 @@ ClassFileWriter::writeAttributes() | |
| } | ||
| #endif /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */ | ||
|
|
||
| #if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) | ||
| /* write ImplicitCreation attribute */ | ||
| if (J9_ARE_ALL_BITS_SET(_romClass->optionalFlags, J9_ROMCLASS_OPTINFO_IMPLICITCREATION_ATTRIBUTE)) { | ||
| writeAttributeHeader((J9UTF8 *) &IMPLICITCREATION, sizeof(U_16)); | ||
| writeU16(getImplicitCreationFlags(_romClass)); | ||
| } | ||
| #endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */ | ||
| } | ||
|
|
||
| void ClassFileWriter::writeRecordAttribute() | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -323,9 +323,6 @@ ROMClassWriter::ROMClassWriter(BufferManager *bufferManager, ClassFileOracle *cl | |
| _injectedInterfaceInfoSRPKey(srpKeyProducer->generateKey()), | ||
| _loadableDescriptorsInfoSRPKey(srpKeyProducer->generateKey()), | ||
| #endif /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */ | ||
| #if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) | ||
| _implicitCreationSRPKey(srpKeyProducer->generateKey()), | ||
| #endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */ | ||
| _permittedSubclassesInfoSRPKey(srpKeyProducer->generateKey()) | ||
| { | ||
| _methodNotes = (MethodNotes *) _bufferManager->alloc(classFileOracle->getMethodsCount() * sizeof(MethodNotes)); | ||
|
|
@@ -462,9 +459,6 @@ ROMClassWriter::writeROMClass(Cursor *cursor, | |
| writeInjectedInterfaces(cursor, markAndCountOnly); | ||
| writeloadableDescriptors(cursor, markAndCountOnly); | ||
| #endif /* J9VM_OPT_VALHALLA_VALUE_TYPES */ | ||
| #if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) | ||
| writeImplicitCreation(cursor, markAndCountOnly); | ||
| #endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */ | ||
| writeOptionalInfo(cursor); | ||
| writeCallSiteData(cursor, markAndCountOnly); | ||
| #if defined(J9VM_OPT_METHOD_HANDLE) | ||
|
|
@@ -1931,27 +1925,6 @@ ROMClassWriter::writePermittedSubclasses(Cursor *cursor, bool markAndCountOnly) | |
| } | ||
| } | ||
|
|
||
| #if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) | ||
| /* | ||
| * ImplicitCreation ROM class layout: | ||
| * 4 bytes for flags (actually takes up two, but use 4 for alignment) | ||
| */ | ||
| void | ||
| ROMClassWriter::writeImplicitCreation(Cursor *cursor, bool markAndCountOnly) | ||
| { | ||
| if (_classFileOracle->hasImplicitCreation()) { | ||
| cursor->mark(_implicitCreationSRPKey); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove _implicitCreationSRPKey from line 327. |
||
|
|
||
| U_16 flags = _classFileOracle->getImplicitCreationFlags(); | ||
| if (markAndCountOnly) { | ||
| cursor->skip(sizeof(U_32)); | ||
| } else { | ||
| cursor->writeU32(flags, Cursor::GENERIC); | ||
| } | ||
| } | ||
| } | ||
| #endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */ | ||
|
|
||
| #if defined(J9VM_OPT_VALHALLA_VALUE_TYPES) | ||
| /* | ||
| * LoadableDescriptors ROM class layout: | ||
|
|
@@ -2035,7 +2008,6 @@ ROMClassWriter::writeOptionalInfo(Cursor *cursor) | |
| * SRP to PermittedSubclasses attribute | ||
| * SRP to injected interfaces info | ||
| * SRP to LoadableDescriptors attribute | ||
| * SRP to ImplicitCreation attribute | ||
| */ | ||
| cursor->mark(_optionalInfoSRPKey); | ||
|
|
||
|
|
@@ -2085,11 +2057,6 @@ ROMClassWriter::writeOptionalInfo(Cursor *cursor) | |
| cursor->writeSRP(_loadableDescriptorsInfoSRPKey, Cursor::SRP_TO_GENERIC); | ||
| } | ||
| #endif /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */ | ||
| #if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) | ||
| if (_classFileOracle->hasImplicitCreation()) { | ||
| cursor->writeSRP(_implicitCreationSRPKey, Cursor::SRP_TO_GENERIC); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove the declaration for _implicitCreationSRPKey as well as the comment |
||
| } | ||
| #endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */ | ||
| } | ||
|
|
||
| void | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
implicitCreationAttributeDoshould also be removed.