Skip to content

Commit

Permalink
Merge pull request #17952 from theresa-m/valhalla_classfileversion
Browse files Browse the repository at this point in the history
Update Valhalla test classfile version
hangshao0 authored Aug 15, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents a2e633e + d87333a commit 20b1157
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions runtime/bcutil/cfreader.c
Original file line number Diff line number Diff line change
@@ -3140,8 +3140,8 @@ j9bcutil_readClassFileBytes(J9PortLibrary *portLib,
}

#if defined(J9VM_OPT_VALHALLA_VALUE_TYPES)
/* Currently value type is built on JDK20, so compare with JDK20 for now. Eventually it may need to compare to JDK21. */
if ((flags & BCT_MajorClassFileVersionMask) < BCT_JavaMajorVersionShifted(20)) {
/* Currently value type is built on JDK22, so compare with JDK22 for now. */
if ((flags & BCT_MajorClassFileVersionMask) < BCT_JavaMajorVersionShifted(22)) {
classfile->accessFlags &= ~(CFR_ACC_VALUE_TYPE | CFR_ACC_PRIMITIVE_VALUE_TYPE | CFR_ACC_IDENTITY);
}
#if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES)
Original file line number Diff line number Diff line change
@@ -196,11 +196,11 @@ private static byte[] generateClass(ClassConfiguration config) {
String[] fields = config.getFields();
int extraClassFlags = config.getExtraClassFlags();
/**
* Currently value type is built on JDK20, so use java file major version 64 for now.
* If moved to JDK21, this needs to be incremented to 65. The check in j9bcutil_readClassFileBytes()
* against BCT_JavaMajorVersionShifted(20) needs to be updated as well.
* Currently value type is built on JDK22, so use java file major version 66 for now.
* If moved this needs to be incremented to the next class file version. The check in j9bcutil_readClassFileBytes()
* against BCT_JavaMajorVersionShifted needs to be updated as well.
*/
int classFileVersion = 64;
int classFileVersion = 66;

String nestHost = config.getNestHost();

0 comments on commit 20b1157

Please sign in to comment.