Skip to content

[GR-68596] Update labsjdk to 26+10-jvmci-b01 #11943

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

Merged
merged 46 commits into from
Aug 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
320919e
Automatic merge of master into galahad
OracleLabsAutomation Jul 31, 2025
26147d0
Automatic merge of master into galahad
OracleLabsAutomation Jul 31, 2025
fd6a46e
Automatic merge of master into galahad
OracleLabsAutomation Jul 31, 2025
765fa9f
Automatic merge of master into galahad
OracleLabsAutomation Aug 1, 2025
c7d667f
Automatic merge of master into galahad
OracleLabsAutomation Aug 1, 2025
ee84d35
Automatic merge of master into galahad
OracleLabsAutomation Aug 1, 2025
d9cd39c
Automatic merge of master into galahad
OracleLabsAutomation Aug 1, 2025
822195a
Automatic merge of master into galahad
OracleLabsAutomation Aug 1, 2025
5dbe596
Automatic merge of master into galahad
OracleLabsAutomation Aug 2, 2025
8feb914
Automatic merge of master into galahad
OracleLabsAutomation Aug 2, 2025
8cf153c
Automatic merge of master into galahad
OracleLabsAutomation Aug 2, 2025
af3d252
Automatic merge of master into galahad
OracleLabsAutomation Aug 2, 2025
7389d88
Automatic merge of master into galahad
OracleLabsAutomation Aug 3, 2025
a77c002
Automatic merge of master into galahad
OracleLabsAutomation Aug 4, 2025
b17a887
Adapt JDK-8364187: Make getClassAccessFlagsRaw non-native
mur47x111 Aug 3, 2025
06a145b
Update galahad JDK
mur47x111 Aug 3, 2025
2368ddd
Automatic merge of master into galahad
OracleLabsAutomation Aug 4, 2025
48cb1e2
Automatic merge of master into galahad
OracleLabsAutomation Aug 4, 2025
9d937d3
Automatic merge of master into galahad
OracleLabsAutomation Aug 4, 2025
aeaa0fb
[JDK-8364586] Adapt JDK-8364187: Make getClassAccessFlagsRaw non-native
mur47x111 Aug 4, 2025
feac5dc
Adapt JDK-8343218: Add option to disable allocating interface and abs…
mur47x111 Aug 4, 2025
64a8a79
Automatic merge of master into galahad
OracleLabsAutomation Aug 4, 2025
712da9e
Update galahad JDK
mur47x111 Aug 4, 2025
ece2abc
[JDK-8364585] Adapt JDK-8343218: Add option to disable allocating int…
mur47x111 Aug 4, 2025
6fce5f4
Automatic merge of master into galahad
OracleLabsAutomation Aug 5, 2025
d7db0f2
Automatic merge of master into galahad
OracleLabsAutomation Aug 5, 2025
41ce410
Automatic merge of master into galahad
OracleLabsAutomation Aug 5, 2025
79af6cb
Automatic merge of master into galahad
OracleLabsAutomation Aug 5, 2025
429dcce
Automatic merge of master into galahad
OracleLabsAutomation Aug 5, 2025
63bc090
Automatic merge of master into galahad
OracleLabsAutomation Aug 5, 2025
2c8dfac
Automatic merge of master into galahad
OracleLabsAutomation Aug 5, 2025
24d3597
Automatic merge of master into galahad
OracleLabsAutomation Aug 6, 2025
f0d7583
Automatic merge of master into galahad
OracleLabsAutomation Aug 6, 2025
8d4ee01
Automatic merge of master into galahad
OracleLabsAutomation Aug 7, 2025
d1b9712
Automatic merge of master into galahad
OracleLabsAutomation Aug 7, 2025
5f8a682
Automatic merge of master into galahad
OracleLabsAutomation Aug 7, 2025
f372cab
Automatic merge of master into galahad
OracleLabsAutomation Aug 7, 2025
c3d7eb6
update JVMCI to 26+10-jvmci-b01
OracleLabsAutomation Aug 7, 2025
eed411d
Merge tag 'jdk-26+10'
zapster Aug 11, 2025
105d2eb
svm: review ContainerLibrary changes in JDK 26+10
zapster Aug 11, 2025
f5416fd
svm: adopt "JDK-8364187: Make getClassAccessFlagsRaw non-native" (inc…
zapster Aug 11, 2025
970603d
deploy snapshots
marwan-hallaoui Aug 11, 2025
bc062d1
crema: propagate raw access flags from parser to DynamicHub
lewurm Aug 11, 2025
9a618cb
Espresso: classAccessFlags is baked in guest class from 26.
rakachan Aug 11, 2025
e91ad6c
svm: further adopt "JDK-8364187: Make getClassAccessFlagsRaw non-native"
zapster Aug 12, 2025
174707f
add missing intrinsic (JDK-8360559)
mur47x111 Aug 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions common.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
"jdks": {
"galahad-jdk": {"name": "jpg-jdk", "version": "26", "build_id": "jdk-26+9-846", "platformspecific": true, "extrabundles": ["static-libs"]},
"galahad-jdk": {"name": "jpg-jdk", "version": "26", "build_id": "jdk-26+10-1012", "platformspecific": true, "extrabundles": ["static-libs"]},

"oraclejdk17": {"name": "jpg-jdk", "version": "17.0.7", "build_id": "jdk-17.0.7+8", "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-17": {"name": "labsjdk", "version": "ce-17.0.7+4-jvmci-23.1-b02", "platformspecific": true },
Expand Down Expand Up @@ -53,13 +53,13 @@
"labsjdk-ee-25Debug": {"name": "labsjdk", "version": "ee-25+30-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ee-25-llvm": {"name": "labsjdk", "version": "ee-25+30-jvmci-b01-sulong", "platformspecific": true },

"oraclejdk-latest": {"name": "jpg-jdk", "version": "26", "build_id": "jdk-26+9", "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-26+9-jvmci-b01", "platformspecific": true },
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-26+9-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-26+9-jvmci-b01-sulong", "platformspecific": true },
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-26+9-jvmci-b01", "platformspecific": true },
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-26+9-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-26+9-jvmci-b01-sulong", "platformspecific": true }
"oraclejdk-latest": {"name": "jpg-jdk", "version": "26", "build_id": "jdk-26+10", "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-26+10-jvmci-b01", "platformspecific": true },
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-26+10-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-26+10-jvmci-b01-sulong", "platformspecific": true },
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-26+10-jvmci-b01", "platformspecific": true },
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-26+10-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-26+10-jvmci-b01-sulong", "platformspecific": true }
},

"eclipse": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -40,7 +40,7 @@ public class HotSpotCompressedKlassPointerTest extends HotSpotGraalCompilerTest
@Before
public void setUp() {
GraalHotSpotVMConfig config = runtime().getVMConfig();
assumeTrue("compressed class pointers specific tests", config.useCompressedClassPointers);
assumeTrue("compressed class pointers specific tests", config.useCompressedClassPointers && !config.useClassMetaspaceForAllClasses);
}

// Non-abstract class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ public long gcTotalCollectionsAddress() {
// Compressed Oops related values.
public final boolean useCompressedOops = getFlag("UseCompressedOops", Boolean.class);
public final boolean useCompressedClassPointers = getFlag("UseCompressedClassPointers", Boolean.class);

public final boolean useClassMetaspaceForAllClasses = getFlag("UseClassMetaspaceForAllClasses", Boolean.class);

// JDK-8305895 allows storing the compressed class pointer in the upper 22 bits of the mark
// word. This runtime optimization is guarded by the flag UseCompactObjectHeaders. It depends
// on compressed class pointers, meaning that if useCompactObjectHeaders is true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public final class JVMCIVersionCheck {
// Checkstyle: stop stable iteration order check
private static final Map<String, Map<String, Version>> JVMCI_MIN_VERSIONS = Map.of(
"26", Map.of(
"Oracle Corporation", createLabsJDKVersion("26+9", 1),
DEFAULT_VENDOR_ENTRY, createLabsJDKVersion("26+9", 1)));
"Oracle Corporation", createLabsJDKVersion("26+10", 1),
DEFAULT_VENDOR_ENTRY, createLabsJDKVersion("26+10", 1)));
// Checkstyle: resume stable iteration order check

private static final int NA = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public void run() {
registerMathPlugins(invocationPlugins, target.arch);
registerContinuationPlugins(invocationPlugins, config);
registerCallSitePlugins(invocationPlugins);
registerReflectionPlugins(invocationPlugins, config);
registerReflectionPlugins(invocationPlugins);
registerAESPlugins(invocationPlugins, config);
registerAdler32Plugins(invocationPlugins, config);
registerCRC32Plugins(invocationPlugins, config);
Expand Down Expand Up @@ -508,7 +508,7 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec
plugins.register(VolatileCallSite.class, plugin);
}

private static void registerReflectionPlugins(InvocationPlugins plugins, GraalHotSpotVMConfig config) {
private static void registerReflectionPlugins(InvocationPlugins plugins) {
Registration r = new Registration(plugins, "jdk.internal.reflect.Reflection");
r.register(new InlineOnlyInvocationPlugin("getCallerClass") {
@Override
Expand All @@ -517,20 +517,6 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec
return true;
}
});
r.register(new InvocationPlugin("getClassAccessFlags", Class.class) {
@Override
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode arg) {
try (HotSpotInvocationPluginHelper helper = new HotSpotInvocationPluginHelper(b, targetMethod, config)) {
ValueNode klass = helper.readKlassFromClass(b.nullCheckedValue(arg));
// Primitive Class case
ValueNode klassNonNull = helper.emitNullReturnGuard(klass, ConstantNode.forInt(Modifier.ABSTRACT | Modifier.FINAL | Modifier.PUBLIC), GraalDirectives.UNLIKELY_PROBABILITY);
// Return (Klass::_access_flags & jvmAccWrittenFlags)
ValueNode accessFlags = helper.readKlassAccessFlags(klassNonNull);
helper.emitFinalReturn(JavaKind.Int, accessFlags);
}
return true;
}
});
}

private static final SpeculationReasonGroup JVMTI_NOTIFY_ALLOCATE_INSTANCE = new SpeculationReasonGroup("JvmtiNotifyAllocateInstance");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ private static void add(Collection<String> c, String... elements) {

public UnimplementedGraalIntrinsics(Architecture arch) {
add(toBeInvestigated, // @formatter:off
// JDK-8360559: Optimize Math.sinh for x86 64 bit platforms
"java/lang/Math.sinh(D)D",
// JDK-8342103: C2 compiler support for Float16 type and associated
// scalar operations
"jdk/internal/vm/vector/Float16Math.fma(Ljava/lang/Class;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljdk/internal/vm/vector/Float16Math$TernaryOperator;)Ljava/lang/Object;",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -44,7 +44,6 @@
import jdk.vm.ci.meta.Constant;
import jdk.vm.ci.meta.ConstantReflectionProvider;
import jdk.vm.ci.meta.JavaConstant;
import jdk.vm.ci.meta.ResolvedJavaType;

@NodeInfo(nameTemplate = "{p#op/s}", cycles = CYCLES_2, size = SIZE_2)
public final class HotSpotCompressionNode extends CompressionNode {
Expand Down Expand Up @@ -74,9 +73,7 @@ private static CompressionNode uncompress(ValueNode input, CompressEncoding enco
@Override
public boolean isCompressible(Constant constant) {
if (constant instanceof HotSpotMetaspaceConstant mc) {
ResolvedJavaType type = mc.asResolvedJavaType();
// As of JDK-8338526, interface and abstract types are not compressible.
return type.isArray() || (!type.isAbstract() && !type.isInterface());
return mc.isCompressible();
}
return true;
}
Expand All @@ -103,14 +100,10 @@ protected Constant uncompress(Constant c) {

@Override
public ValueNode reverse(ValueNode input) {
switch (op) {
case Compress:
return uncompress(input, encoding);
case Uncompress:
return compress(input, encoding);
default:
throw GraalError.shouldNotReachHereUnexpectedValue(op); // ExcludeFromJacocoGeneratedReport
}
return switch (op) {
case Compress -> uncompress(input, encoding);
case Uncompress -> compress(input, encoding);
};
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -30,7 +30,6 @@
import jdk.graal.compiler.core.common.CompressEncoding;
import jdk.graal.compiler.core.common.type.AbstractObjectStamp;
import jdk.graal.compiler.core.common.type.Stamp;
import jdk.graal.compiler.debug.GraalError;
import jdk.graal.compiler.graph.NodeClass;
import jdk.graal.compiler.lir.gen.LIRGeneratorTool;
import jdk.graal.compiler.nodeinfo.NodeInfo;
Expand Down Expand Up @@ -83,26 +82,18 @@ public JavaConstant nullConstant() {

@Override
public Constant convert(Constant c, ConstantReflectionProvider constantReflection) {
switch (op) {
case Compress:
return compress(c);
case Uncompress:
return uncompress(c);
default:
throw GraalError.shouldNotReachHereUnexpectedValue(op); // ExcludeFromJacocoGeneratedReport
}
return switch (op) {
case Compress -> compress(c);
case Uncompress -> uncompress(c);
};
}

@Override
public Constant reverse(Constant c, ConstantReflectionProvider constantReflection) {
switch (op) {
case Compress:
return uncompress(c);
case Uncompress:
return compress(c);
default:
throw GraalError.shouldNotReachHereUnexpectedValue(op); // ExcludeFromJacocoGeneratedReport
}
return switch (op) {
case Compress -> uncompress(c);
case Uncompress -> compress(c);
};
}

/**
Expand Down Expand Up @@ -138,14 +129,12 @@ public boolean isCompressible(Constant constant) {

@Override
public ValueNode canonical(CanonicalizerTool tool, ValueNode forValue) {
if (forValue.isConstant()) {
ConstantNode constant = (ConstantNode) forValue;
if (forValue instanceof ConstantNode constant) {
if (isCompressible(constant.getValue())) {
return ConstantNode.forConstant(stamp(NodeView.DEFAULT), convert(constant.getValue(), tool.getConstantReflection()), constant.getStableDimension(),
constant.isDefaultStable(), tool.getMetaAccess());
}
} else if (forValue instanceof CompressionNode) {
CompressionNode other = (CompressionNode) forValue;
} else if (forValue instanceof CompressionNode other) {
if (op != other.op && encoding.equals(other.encoding)) {
return other.getValue();
}
Expand All @@ -164,17 +153,10 @@ public void generate(NodeLIRBuilderTool gen) {
}

LIRGeneratorTool tool = gen.getLIRGeneratorTool();
Value result;
switch (op) {
case Compress:
result = tool.emitCompress(gen.operand(value), encoding, nonNull);
break;
case Uncompress:
result = tool.emitUncompress(gen.operand(value), encoding, nonNull);
break;
default:
throw GraalError.shouldNotReachHereUnexpectedValue(op); // ExcludeFromJacocoGeneratedReport
}
Value result = switch (op) {
case Compress -> tool.emitCompress(gen.operand(value), encoding, nonNull);
case Uncompress -> tool.emitUncompress(gen.operand(value), encoding, nonNull);
};

gen.setResult(this, result);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public static final class VersionRange {
public static final VersionRange VERSION_22_OR_HIGHER = higher(22);
public static final VersionRange VERSION_24_OR_LOWER = lower(24);
public static final VersionRange VERSION_25_OR_HIGHER = higher(25);
public static final VersionRange VERSION_26_OR_HIGHER = higher(26);

public static final VersionRange ALL = between(0, LATEST_SUPPORTED);
public static final VersionRange VERSION_9_TO_21 = between(9, 21);
Expand Down Expand Up @@ -211,6 +212,14 @@ public boolean java25OrLater() {
return version >= 25;
}

public boolean java25OrEarlier() {
return version <= 25;
}

public boolean java26OrLater() {
return version >= 26;
}

public boolean inRange(int low, int high) {
return version >= low && version <= high;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,7 @@ public static class Names {
public static final Symbol<Name> componentType = SYMBOLS.putName("componentType");
public static final Symbol<Name> protectionDomain = SYMBOLS.putName("protectionDomain");
public static final Symbol<Name> modifiers = SYMBOLS.putName("modifiers");
public static final Symbol<Name> classFileAccessFlags = SYMBOLS.putName("classFileAccessFlags");
public static final Symbol<Name> primitive = SYMBOLS.putName("primitive");
public static final Symbol<Name> signers = SYMBOLS.putName("signers");
// j.l.ClassLoader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ public static boolean isRecord0(@JavaType(Class.class) StaticObject self, @Injec
}

@Substitution(hasReceiver = true)
// Method no longer exists in 26.
public static int getClassAccessFlagsRaw0(@JavaType(Class.class) StaticObject self, @Inject EspressoContext ctx) {
return ctx.getVM().JVM_GetClassAccessFlags(self);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@
import com.oracle.truffle.espresso.substitutions.Inject;
import com.oracle.truffle.espresso.substitutions.JavaType;
import com.oracle.truffle.espresso.substitutions.Substitution;
import com.oracle.truffle.espresso.substitutions.VersionFilter;
import com.oracle.truffle.espresso.vm.VM;

@EspressoSubstitutions(type = "Ljdk/internal/reflect/Reflection;", group = LibJava.class)
public final class Target_jdk_internal_reflect_Reflection {
@Substitution
@Substitution(languageFilter = VersionFilter.Java25OrEarlier.class)
public static int getClassAccessFlags(@JavaType(Class.class) StaticObject cls, @Inject EspressoContext ctx) {
return ctx.getVM().JVM_GetClassAccessFlags(cls);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import static com.oracle.truffle.espresso.classfile.JavaVersion.VersionRange.VERSION_22_TO_23;
import static com.oracle.truffle.espresso.classfile.JavaVersion.VersionRange.VERSION_24_OR_LOWER;
import static com.oracle.truffle.espresso.classfile.JavaVersion.VersionRange.VERSION_25_OR_HIGHER;
import static com.oracle.truffle.espresso.classfile.JavaVersion.VersionRange.VERSION_26_OR_HIGHER;
import static com.oracle.truffle.espresso.classfile.JavaVersion.VersionRange.VERSION_8_OR_LOWER;
import static com.oracle.truffle.espresso.classfile.JavaVersion.VersionRange.VERSION_9_OR_HIGHER;
import static com.oracle.truffle.espresso.classfile.JavaVersion.VersionRange.VERSION_9_TO_21;
Expand Down Expand Up @@ -118,6 +119,9 @@ public Meta(EspressoContext context) {
java_lang_Class_modifiers = diff() //
.field(VERSION_25_OR_HIGHER, Names.modifiers, Types._char) //
.notRequiredField(java_lang_Class);
java_lang_Class_classFileAccessFlags = diff() //
.field(VERSION_26_OR_HIGHER, Names.classFileAccessFlags, Types._char) //
.notRequiredField(java_lang_Class);
java_lang_Class_primitive = diff() //
.field(VERSION_25_OR_HIGHER, Names.primitive, Types._boolean) //
.notRequiredField(java_lang_Class);
Expand Down Expand Up @@ -1391,6 +1395,7 @@ private DiffVersionLoadHelper diff() {
public final Field java_lang_Class_module;
public final Field java_lang_Class_classLoader;
public final Field java_lang_Class_modifiers;
public final Field java_lang_Class_classFileAccessFlags;
public final Field java_lang_Class_primitive;
public final Field sun_reflect_ConstantPool_constantPoolOop;
public final ArrayKlass java_lang_Class_array;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ public StaticObject createClass(Klass klass) {
meta.java_lang_Class_modifiers.setChar(newObj, (char) klass.getClassModifiers());
meta.java_lang_Class_primitive.setBoolean(newObj, klass.isPrimitive());
}
if (lang.getJavaVersion().java26OrLater()) {
assert meta.java_lang_Class_classFileAccessFlags != null;
meta.java_lang_Class_classFileAccessFlags.setChar(newObj, (char) VM.getClassAccessFlags(klass));
}
return trackAllocation(klass, newObj);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,4 +225,16 @@ public boolean isValidFor(JavaVersion version) {
return version.java25OrLater();
}
}

final class Java25OrEarlier implements VersionFilter {
public static final Java25OrEarlier INSTANCE = new Java25OrEarlier();

private Java25OrEarlier() {
}

@Override
public boolean isValidFor(JavaVersion version) {
return version.java25OrEarlier();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1378,6 +1378,10 @@ public boolean JVM_IsRecord(@JavaType(Class.class) StaticObject self) {
@VmImpl(isJni = true)
public int JVM_GetClassAccessFlags(@JavaType(Class.class) StaticObject clazz) {
Klass klass = clazz.getMirrorKlass(getMeta());
return getClassAccessFlags(klass);
}

public static int getClassAccessFlags(Klass klass) {
if (klass.isPrimitive()) {
final int primitiveFlags = ACC_ABSTRACT | ACC_FINAL | ACC_PUBLIC;
assert klass.getModifiers() == primitiveFlags;
Expand Down
Loading
Loading