Skip to content

Commit 96a5772

Browse files
Aditi SrinivasAditi Srinivas
authored andcommitted
Remove Implicit creation work
Related: #22642 Remove the implicit creation work. Update the tests to follow the new spec.
1 parent 548e7cf commit 96a5772

29 files changed

+50
-468
lines changed

debugtools/DDR_VM/src/com/ibm/j9ddr/CompatibilityConstants29.dat

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ J9JavaClassFlags.J9ClassLargestAlignmentConstraintDouble = 0
8383
J9JavaClassFlags.J9ClassLargestAlignmentConstraintReference = 0
8484
J9JavaClassFlags.J9ClassRequiresPrePadding = 0
8585

86-
J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_IMPLICITCREATION_ATTRIBUTE = 0
8786
J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_INJECTED_INTERFACE_INFO = 0
8887
J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_LOADABLEDESCRIPTORS_ATTRIBUTE = 0
8988
J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_PERMITTEDSUBCLASSES_ATTRIBUTE = 0

debugtools/DDR_VM/src/com/ibm/j9ddr/vm29/j9/OptInfo.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import static com.ibm.j9ddr.vm29.structure.J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_CLASS_ANNOTATION_INFO;
2727
import static com.ibm.j9ddr.vm29.structure.J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_ENCLOSING_METHOD;
2828
import static com.ibm.j9ddr.vm29.structure.J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_GENERIC_SIGNATURE;
29-
import static com.ibm.j9ddr.vm29.structure.J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_IMPLICITCREATION_ATTRIBUTE;
3029
import static com.ibm.j9ddr.vm29.structure.J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_LOADABLEDESCRIPTORS_ATTRIBUTE;
3130
import static com.ibm.j9ddr.vm29.structure.J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_PERMITTEDSUBCLASSES_ATTRIBUTE;
3231
import static com.ibm.j9ddr.vm29.structure.J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_SIMPLE_NAME;
@@ -294,14 +293,4 @@ public static J9UTF8Pointer getLoadableDescriptorAtIndex(J9ROMClassPointer romCl
294293
}
295294
return J9UTF8Pointer.NULL;
296295
}
297-
298-
public static U32 getImplicitCreationFlags(J9ROMClassPointer romClass) throws CorruptDataException {
299-
SelfRelativePointer srpPtr = getSRPPtr(J9ROMClassHelper.optionalInfo(romClass), romClass.optionalFlags(),
300-
J9_ROMCLASS_OPTINFO_IMPLICITCREATION_ATTRIBUTE);
301-
if (srpPtr.notNull()) {
302-
U32Pointer u32Ptr = U32Pointer.cast(srpPtr.get());
303-
return u32Ptr.at(0);
304-
}
305-
return U32.MIN;
306-
}
307296
}

debugtools/DDR_VM/src/com/ibm/j9ddr/vm29/pointer/helper/J9ROMClassHelper.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
package com.ibm.j9ddr.vm29.pointer.helper;
2323

2424
import static com.ibm.j9ddr.vm29.structure.J9JavaAccessFlags.*;
25-
import static com.ibm.j9ddr.vm29.structure.J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_IMPLICITCREATION_ATTRIBUTE;
2625
import static com.ibm.j9ddr.vm29.structure.J9NonbuilderConstants.J9_ROMCLASS_OPTINFO_LOADABLEDESCRIPTORS_ATTRIBUTE;
2726

2827
import com.ibm.j9ddr.CorruptDataException;
@@ -139,7 +138,4 @@ public static boolean hasLoadableDescriptorsAttribute(J9ROMClassPointer romclass
139138
return romclass.optionalFlags().allBitsIn(J9_ROMCLASS_OPTINFO_LOADABLEDESCRIPTORS_ATTRIBUTE);
140139
}
141140

142-
public static boolean hasImplicitCreationAttribute(J9ROMClassPointer romclass) throws CorruptDataException {
143-
return romclass.optionalFlags().allBitsIn(J9_ROMCLASS_OPTINFO_IMPLICITCREATION_ATTRIBUTE);
144-
}
145141
}

debugtools/DDR_VM/src/com/ibm/j9ddr/vm29/tools/ddrinteractive/RomClassWalker.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -737,11 +737,6 @@ void allSlotsInOptionalInfoDo() throws CorruptDataException {
737737
cursor = cursor.add(1);
738738
}
739739
}
740-
if (J9ROMClassHelper.hasImplicitCreationAttribute(romClass)) {
741-
classWalkerCallback.addSlot(clazz, SlotType.J9_SRP, cursor, "implicitCreationAttributeSRP");
742-
implicitCreationAttributeDo(U32Pointer.cast(cursor.get()));
743-
cursor = cursor.add(1);
744-
}
745740
classWalkerCallback.addSection(clazz, optionalInfo, cursor.getAddress() - optionalInfo.getAddress(), "optionalInfo", true);
746741
}
747742

@@ -1003,16 +998,6 @@ void loadableDescriptorsAttributeDo(U32Pointer attribute) throws CorruptDataExce
1003998
"loadableDescriptorsAttribute", true);
1004999
}
10051000

1006-
void implicitCreationAttributeDo(U32Pointer attribute) throws CorruptDataException {
1007-
if (attribute.isNull()) {
1008-
return;
1009-
}
1010-
U32Pointer attributeStart = attribute;
1011-
classWalkerCallback.addSlot(clazz, SlotType.J9_U32, attribute, "implicitCreationFlags");
1012-
attribute = attribute.add(1);
1013-
classWalkerCallback.addSection(clazz, attributeStart, attribute.getAddress() - attributeStart.getAddress(), "implicitCreationAttribute", true);
1014-
}
1015-
10161001
int allSlotsInAnnotationDo(U32Pointer annotation, String annotationSectionName) throws CorruptDataException {
10171002
int increment = 0;
10181003
int annotationLength = annotation.at(0).intValue();

debugtools/DDR_VM/src/com/ibm/j9ddr/vm29/tools/ddrinteractive/commands/J9BCUtil.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -651,11 +651,6 @@ public static void j9bcutil_dumpRomClass(PrintStream out, J9ROMClassPointer romC
651651
}
652652
}
653653

654-
if (J9ROMClassHelper.hasImplicitCreationAttribute(romClass)) {
655-
U32 implicitCreationFlags = OptInfo.getImplicitCreationFlags(romClass);
656-
out.format("ImplicitCreation flags: %s%n", implicitCreationFlags.getHexValue());
657-
}
658-
659654
UDATA romFieldCount = romClass.romFieldCount();
660655
out.append(String.format("Fields (%d):" + nl, romFieldCount.longValue()));
661656

runtime/bcutil/ClassFileOracle.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,6 @@ ClassFileOracle::ClassFileOracle(BufferManager *bufferManager, J9CfrClassFile *c
230230
_hasNonStaticSynchronizedMethod(false),
231231
_loadableDescriptorsAttribute(NULL),
232232
#endif /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */
233-
#if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES)
234-
_hasImplicitCreationAttribute(false),
235-
_implicitCreationFlags(0),
236-
#endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */
237233
_recordComponentCount(0),
238234
_permittedSubclassesAttribute(NULL),
239235
_isSealed(false),
@@ -560,9 +556,6 @@ ClassFileOracle::walkAttributes()
560556
}
561557
knownAnnotations = addAnnotationBit(knownAnnotations, UNMODIFIABLE_ANNOTATION);
562558
knownAnnotations = addAnnotationBit(knownAnnotations, VALUEBASED_ANNOTATION);
563-
#if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES)
564-
knownAnnotations = addAnnotationBit(knownAnnotations, LOOSELYCONSISTENTVALUE_ANNOTATION);
565-
#endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */
566559
_annotationsAttribute = (J9CfrAttributeRuntimeVisibleAnnotations *)attrib;
567560
if (0 == _annotationsAttribute->rawDataLength) {
568561
UDATA foundAnnotations = walkAnnotations(_annotationsAttribute->numberOfAnnotations, _annotationsAttribute->annotations, knownAnnotations);
@@ -575,12 +568,6 @@ ClassFileOracle::walkAttributes()
575568
if (containsKnownAnnotation(foundAnnotations, VALUEBASED_ANNOTATION)) {
576569
_isClassValueBased = true;
577570
}
578-
#if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES)
579-
if (containsKnownAnnotation(foundAnnotations, LOOSELYCONSISTENTVALUE_ANNOTATION)) {
580-
_hasImplicitCreationAttribute = true;
581-
_implicitCreationFlags |= J9AccImplicitCreateNonAtomic;
582-
}
583-
#endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */
584571
}
585572
break;
586573
}
@@ -633,12 +620,6 @@ ClassFileOracle::walkAttributes()
633620
break;
634621
}
635622
#endif /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */
636-
#if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES)
637-
case CFR_ATTRIBUTE_ImplicitCreation: {
638-
_hasImplicitCreationAttribute = true;
639-
_implicitCreationFlags = ((J9CfrAttributeImplicitCreation *)attrib)->implicitCreationFlags;
640-
break;
641-
}
642623
#endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */
643624
#if JAVA_SPEC_VERSION >= 11
644625
case CFR_ATTRIBUTE_NestMembers:

runtime/bcutil/ClassFileOracle.hpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,10 +1069,6 @@ class RecordComponentIterator
10691069
return result;
10701070
}
10711071
#endif /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */
1072-
#if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES)
1073-
bool hasImplicitCreation() const { return _hasImplicitCreationAttribute; }
1074-
U_16 getImplicitCreationFlags() const { return _implicitCreationFlags; }
1075-
#endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */
10761072

10771073
U_16 getPermittedSubclassesClassNameAtIndex(U_16 index) const {
10781074
U_16 result = 0;
@@ -1129,7 +1125,6 @@ class RecordComponentIterator
11291125
#endif /* JAVA_SPEC_VERSION >= 20 */
11301126
#if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES)
11311127
NULLRESTRICTED_ANNOTATION,
1132-
LOOSELYCONSISTENTVALUE_ANNOTATION,
11331128
#endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */
11341129
KNOWN_ANNOTATION_COUNT
11351130
};
@@ -1203,10 +1198,6 @@ class RecordComponentIterator
12031198
#if defined(J9VM_OPT_VALHALLA_VALUE_TYPES)
12041199
J9CfrAttributeLoadableDescriptors *_loadableDescriptorsAttribute;
12051200
#endif /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */
1206-
#if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES)
1207-
bool _hasImplicitCreationAttribute;
1208-
U_16 _implicitCreationFlags;
1209-
#endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */
12101201
#if JAVA_SPEC_VERSION >= 11
12111202
J9CfrAttributeNestMembers *_nestMembers;
12121203
#endif /* JAVA_SPEC_VERSION >= 11 */

runtime/bcutil/ClassFileWriter.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ DECLARE_UTF8_ATTRIBUTE_NAME(PERMITTED_SUBCLASSES, "PermittedSubclasses");
6868
DECLARE_UTF8_ATTRIBUTE_NAME(LOADABLEDESCRIPTORS, "LoadableDescriptors");
6969
#endif /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */
7070
#if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES)
71-
DECLARE_UTF8_ATTRIBUTE_NAME(IMPLICITCREATION, "ImplicitCreation");
7271
DECLARE_UTF8_ATTRIBUTE_NAME(NULLRESTRICTED, "NullRestricted");
7372
#endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */
7473
#if JAVA_SPEC_VERSION >= 11
@@ -129,13 +128,6 @@ ClassFileWriter::analyzeROMClass()
129128
}
130129
}
131130
#endif /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */
132-
#if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES)
133-
if (J9_ARE_ALL_BITS_SET(_romClass->optionalFlags, J9_ROMCLASS_OPTINFO_IMPLICITCREATION_ATTRIBUTE)) {
134-
U_32 implicitCreationFlags = (U_32)getImplicitCreationFlags(_romClass);
135-
addEntry((void*) &IMPLICITCREATION, 0, CFR_CONSTANT_Utf8);
136-
addEntry(&implicitCreationFlags, 0, CFR_CONSTANT_Integer);
137-
}
138-
#endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */
139131
J9EnclosingObject * enclosingObject = getEnclosingMethodForROMClass(_javaVM, NULL, _romClass);
140132
J9UTF8 * genericSignature = getGenericSignatureForROMClass(_javaVM, NULL, _romClass);
141133
J9UTF8 * sourceFileName = getSourceFileNameForROMClass(_javaVM, NULL, _romClass);
@@ -1048,11 +1040,6 @@ ClassFileWriter::writeAttributes()
10481040
attributesCount += 1;
10491041
}
10501042
#endif /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */
1051-
#if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES)
1052-
if (J9_ARE_ALL_BITS_SET(_romClass->optionalFlags, J9_ROMCLASS_OPTINFO_IMPLICITCREATION_ATTRIBUTE)) {
1053-
attributesCount += 1;
1054-
}
1055-
#endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */
10561043
writeU16(attributesCount);
10571044

10581045
if ((0 != _romClass->innerClassCount)
@@ -1237,13 +1224,6 @@ ClassFileWriter::writeAttributes()
12371224
}
12381225
#endif /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */
12391226

1240-
#if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES)
1241-
/* write ImplicitCreation attribute */
1242-
if (J9_ARE_ALL_BITS_SET(_romClass->optionalFlags, J9_ROMCLASS_OPTINFO_IMPLICITCREATION_ATTRIBUTE)) {
1243-
writeAttributeHeader((J9UTF8 *) &IMPLICITCREATION, sizeof(U_16));
1244-
writeU16(getImplicitCreationFlags(_romClass));
1245-
}
1246-
#endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */
12471227
}
12481228

12491229
void ClassFileWriter::writeRecordAttribute()

runtime/bcutil/ROMClassBuilder.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,11 +1439,6 @@ ROMClassBuilder::computeOptionalFlags(ClassFileOracle *classFileOracle, ROMClass
14391439
optionalFlags |= J9_ROMCLASS_OPTINFO_LOADABLEDESCRIPTORS_ATTRIBUTE;
14401440
}
14411441
#endif /* J9VM_OPT_VALHALLA_VALUE_TYPES */
1442-
#if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES)
1443-
if (classFileOracle->hasImplicitCreation()) {
1444-
optionalFlags |= J9_ROMCLASS_OPTINFO_IMPLICITCREATION_ATTRIBUTE;
1445-
}
1446-
#endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */
14471442
return optionalFlags;
14481443
}
14491444

runtime/bcutil/ROMClassWriter.cpp

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,6 @@ ROMClassWriter::ROMClassWriter(BufferManager *bufferManager, ClassFileOracle *cl
323323
_injectedInterfaceInfoSRPKey(srpKeyProducer->generateKey()),
324324
_loadableDescriptorsInfoSRPKey(srpKeyProducer->generateKey()),
325325
#endif /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */
326-
#if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES)
327-
_implicitCreationSRPKey(srpKeyProducer->generateKey()),
328-
#endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */
329326
_permittedSubclassesInfoSRPKey(srpKeyProducer->generateKey())
330327
{
331328
_methodNotes = (MethodNotes *) _bufferManager->alloc(classFileOracle->getMethodsCount() * sizeof(MethodNotes));
@@ -462,9 +459,6 @@ ROMClassWriter::writeROMClass(Cursor *cursor,
462459
writeInjectedInterfaces(cursor, markAndCountOnly);
463460
writeloadableDescriptors(cursor, markAndCountOnly);
464461
#endif /* J9VM_OPT_VALHALLA_VALUE_TYPES */
465-
#if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES)
466-
writeImplicitCreation(cursor, markAndCountOnly);
467-
#endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */
468462
writeOptionalInfo(cursor);
469463
writeCallSiteData(cursor, markAndCountOnly);
470464
#if defined(J9VM_OPT_METHOD_HANDLE)
@@ -1931,27 +1925,6 @@ ROMClassWriter::writePermittedSubclasses(Cursor *cursor, bool markAndCountOnly)
19311925
}
19321926
}
19331927

1934-
#if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES)
1935-
/*
1936-
* ImplicitCreation ROM class layout:
1937-
* 4 bytes for flags (actually takes up two, but use 4 for alignment)
1938-
*/
1939-
void
1940-
ROMClassWriter::writeImplicitCreation(Cursor *cursor, bool markAndCountOnly)
1941-
{
1942-
if (_classFileOracle->hasImplicitCreation()) {
1943-
cursor->mark(_implicitCreationSRPKey);
1944-
1945-
U_16 flags = _classFileOracle->getImplicitCreationFlags();
1946-
if (markAndCountOnly) {
1947-
cursor->skip(sizeof(U_32));
1948-
} else {
1949-
cursor->writeU32(flags, Cursor::GENERIC);
1950-
}
1951-
}
1952-
}
1953-
#endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */
1954-
19551928
#if defined(J9VM_OPT_VALHALLA_VALUE_TYPES)
19561929
/*
19571930
* LoadableDescriptors ROM class layout:
@@ -2085,11 +2058,6 @@ ROMClassWriter::writeOptionalInfo(Cursor *cursor)
20852058
cursor->writeSRP(_loadableDescriptorsInfoSRPKey, Cursor::SRP_TO_GENERIC);
20862059
}
20872060
#endif /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */
2088-
#if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES)
2089-
if (_classFileOracle->hasImplicitCreation()) {
2090-
cursor->writeSRP(_implicitCreationSRPKey, Cursor::SRP_TO_GENERIC);
2091-
}
2092-
#endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */
20932061
}
20942062

20952063
void

0 commit comments

Comments
 (0)