Skip to content

Commit 3d1166d

Browse files
committed
Switch to ECJ ver 3.43 supporting javaCompliance up to 25.
1 parent 2d6e4b5 commit 3d1166d

File tree

168 files changed

+479
-572
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+479
-572
lines changed

common.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"Jsonnet files should not include this file directly but use ci/common.jsonnet instead."
55
],
66

7-
"mx_version": "7.62.1",
7+
"mx_version": "7.62.2",
88

99
"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
1010
"jdks": {

sdk/src/org.graalvm.nativeimage/src/org/graalvm/nativeimage/hosted/RuntimeForeignAccess.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -50,6 +50,7 @@
5050
import org.graalvm.nativeimage.impl.RuntimeForeignAccessSupport;
5151

5252
@Platforms(Platform.HOSTED_ONLY.class)
53+
@SuppressWarnings("all")
5354
public final class RuntimeForeignAccess {
5455

5556
/**

substratevm/mx.substratevm/suite.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,6 @@
385385
],
386386
},
387387
"javaCompliance" : "24+",
388-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
389388
"spotbugs": "false", # SpotBugs does not support Java 24
390389
"checkstyleVersion" : "10.21.0",
391390
"annotationProcessors": [
@@ -422,7 +421,6 @@
422421
},
423422
"checkstyle": "com.oracle.svm.core",
424423
"javaCompliance" : "24+",
425-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
426424
"spotbugs": "false", # SpotBugs does not support Java 24
427425
"annotationProcessors": [
428426
"compiler:GRAAL_PROCESSOR",
@@ -448,7 +446,6 @@
448446
},
449447
"checkstyle": "com.oracle.svm.core",
450448
"javaCompliance" : "24+",
451-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
452449
"spotbugs": "false", # SpotBugs does not support Java 24
453450
"annotationProcessors": [
454451
"compiler:GRAAL_PROCESSOR",
@@ -473,7 +470,6 @@
473470
},
474471
"checkstyle": "com.oracle.svm.core",
475472
"javaCompliance" : "24+",
476-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
477473
"spotbugs": "false", # SpotBugs does not support Java 24
478474
"annotationProcessors": [
479475
"compiler:GRAAL_PROCESSOR",
@@ -498,7 +494,6 @@
498494
},
499495
"checkstyle": "com.oracle.svm.core",
500496
"javaCompliance" : "24+",
501-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
502497
"spotbugs": "false", # SpotBugs does not support Java 24
503498
"annotationProcessors": [
504499
"compiler:GRAAL_PROCESSOR",
@@ -527,7 +522,6 @@
527522
},
528523
"checkstyle": "com.oracle.svm.core",
529524
"javaCompliance" : "24+",
530-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
531525
"spotbugs": "false", # SpotBugs does not support Java 24
532526
"annotationProcessors": [
533527
"compiler:GRAAL_PROCESSOR",
@@ -559,7 +553,6 @@
559553
},
560554
"checkstyle": "com.oracle.svm.core",
561555
"javaCompliance" : "24+",
562-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
563556
"annotationProcessors": [
564557
"compiler:GRAAL_PROCESSOR",
565558
"SVM_PROCESSOR",
@@ -584,7 +577,6 @@
584577
},
585578
"checkstyle": "com.oracle.svm.core",
586579
"javaCompliance" : "24+",
587-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
588580
"annotationProcessors": [
589581
"compiler:GRAAL_PROCESSOR",
590582
"SVM_PROCESSOR",
@@ -761,7 +753,6 @@
761753
],
762754
},
763755
"javaCompliance" : "24+",
764-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
765756
"spotbugs": "false", # SpotBugs does not support Java 24
766757
"checkstyleVersion": "10.21.0",
767758
"annotationProcessors": [
@@ -806,7 +797,6 @@
806797
],
807798
},
808799
"javaCompliance" : "24+",
809-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
810800
"annotationProcessors": [
811801
"compiler:GRAAL_PROCESSOR",
812802
"SVM_PROCESSOR",
@@ -851,7 +841,6 @@
851841
],
852842
},
853843
"javaCompliance" : "24+",
854-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
855844
"annotationProcessors": [
856845
"compiler:GRAAL_PROCESSOR",
857846
"SVM_PROCESSOR",
@@ -1056,7 +1045,6 @@
10561045
"SVM_PROCESSOR",
10571046
],
10581047
"javaCompliance" : "24+",
1059-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
10601048
"spotbugs": "false",
10611049
"jacoco" : "exclude",
10621050
},
@@ -1095,7 +1083,6 @@
10951083
"SVM_PROCESSOR",
10961084
],
10971085
"javaCompliance" : "24+",
1098-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
10991086
"spotbugs": "false",
11001087
"jacoco" : "exclude",
11011088
},
@@ -1284,7 +1271,6 @@
12841271
},
12851272
"checkstyle": "com.oracle.svm.hosted",
12861273
"javaCompliance" : "24+",
1287-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
12881274
"spotbugs": "false", # SpotBugs does not support Java 24
12891275
"annotationProcessors": [
12901276
"compiler:GRAAL_PROCESSOR",
@@ -1317,7 +1303,6 @@
13171303
"SVM_PROCESSOR",
13181304
],
13191305
"javaCompliance" : "24+",
1320-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
13211306
"spotbugs": "false",
13221307
"testProject": True,
13231308
"jacoco" : "exclude",
@@ -1376,7 +1361,6 @@
13761361
},
13771362
"checkstyle": "com.oracle.svm.hosted",
13781363
"javaCompliance" : "24+",
1379-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
13801364
"spotbugs": "false", # SpotBugs does not support Java 24
13811365
"annotationProcessors": [
13821366
"compiler:GRAAL_PROCESSOR",
@@ -1402,7 +1386,6 @@
14021386
],
14031387
"checkstyle": "com.oracle.svm.hosted",
14041388
"javaCompliance" : "24+",
1405-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
14061389
"spotbugs": "false", # SpotBugs does not support Java 24
14071390
"annotationProcessors": [
14081391
"compiler:GRAAL_PROCESSOR",
@@ -1422,7 +1405,6 @@
14221405
],
14231406
"checkstyle": "com.oracle.svm.hosted",
14241407
"javaCompliance" : "24+",
1425-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
14261408
"spotbugs": "false", # SpotBugs does not support Java 24
14271409
"annotationProcessors": [
14281410
"compiler:GRAAL_PROCESSOR",
@@ -1442,7 +1424,6 @@
14421424
],
14431425
"checkstyle": "com.oracle.svm.hosted",
14441426
"javaCompliance" : "24+",
1445-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
14461427
"spotbugs": "false", # SpotBugs does not support Java 24
14471428
"annotationProcessors": [
14481429
"compiler:GRAAL_PROCESSOR",
@@ -1466,7 +1447,6 @@
14661447
],
14671448
"checkstyle": "com.oracle.svm.core",
14681449
"javaCompliance" : "24+",
1469-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
14701450
"annotationProcessors": [
14711451
"compiler:GRAAL_PROCESSOR",
14721452
"SVM_PROCESSOR",
@@ -1517,7 +1497,6 @@
15171497
"SVM_PROCESSOR",
15181498
],
15191499
"javaCompliance" : "24+",
1520-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
15211500
"spotbugs": "false",
15221501
"jacoco" : "exclude",
15231502
},
@@ -1545,7 +1524,6 @@
15451524
"SVM_PROCESSOR",
15461525
],
15471526
"javaCompliance" : "24+",
1548-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
15491527
"spotbugs": "false",
15501528
"jacoco" : "exclude",
15511529
},
@@ -1571,7 +1549,6 @@
15711549
"SVM_PROCESSOR",
15721550
],
15731551
"javaCompliance" : "24+",
1574-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
15751552
"spotbugs": "false",
15761553
"jacoco" : "exclude",
15771554
},
@@ -1599,7 +1576,6 @@
15991576
"SVM_PROCESSOR",
16001577
],
16011578
"javaCompliance" : "24+",
1602-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
16031579
"spotbugs": "false", # SpotBugs does not support Java 24
16041580
"jacoco" : "exclude",
16051581
"graalCompilerSourceEdition": "ignore",
@@ -1619,7 +1595,6 @@
16191595
},
16201596
"checkstyle": "com.oracle.svm.hosted",
16211597
"javaCompliance": "24+",
1622-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
16231598
"spotbugs": "false", # SpotBugs does not support Java 24
16241599
"workingSets": "SVM",
16251600
"jacoco": "exclude",
@@ -1647,7 +1622,6 @@
16471622
},
16481623
"checkstyle": "com.oracle.svm.hosted",
16491624
"javaCompliance": "24+",
1650-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
16511625
"spotbugs": "false", # SpotBugs does not support Java 24
16521626
"annotationProcessors": [
16531627
"compiler:GRAAL_PROCESSOR",
@@ -1671,7 +1645,6 @@
16711645
},
16721646
"checkstyle": "com.oracle.svm.hosted",
16731647
"javaCompliance": "24+",
1674-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
16751648
"spotbugs": "false", # SpotBugs does not support Java 24
16761649
"annotationProcessors": [
16771650
"compiler:GRAAL_PROCESSOR",
@@ -1699,7 +1672,6 @@
16991672
},
17001673
"checkstyle": "com.oracle.svm.hosted",
17011674
"javaCompliance": "24+",
1702-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
17031675
"spotbugs": "false", # SpotBugs does not support Java 24
17041676
"annotationProcessors": [
17051677
"substratevm:SVM_PROCESSOR",
@@ -1727,7 +1699,6 @@
17271699
},
17281700
"checkstyle": "com.oracle.svm.hosted",
17291701
"javaCompliance": "24+",
1730-
"forceJavac" : "true", # ECJ does not support Java 24 (GR-63814)
17311702
"spotbugs": "false", # SpotBugs does not support Java 24
17321703
"annotationProcessors": [
17331704
"substratevm:SVM_PROCESSOR",

substratevm/src/com.oracle.svm.agent/src/com/oracle/svm/agent/configwithorigins/ClassInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public MethodInfo findOrCreateMethodInfo(long rawJMethodIdValue) {
6262
String methodSignature = MethodInfoRecordKeeper.getJavaStringAndFreeNativeString(methodSignaturePtr.read());
6363
String methodNameAndSignature = combineMethodNameAndSignature(methodName, methodSignature);
6464

65-
nameAndSignatureToMethodInfoMap.computeIfAbsent(methodNameAndSignature, nameAndSignature -> new MethodInfo(methodName, methodSignature, className));
65+
nameAndSignatureToMethodInfoMap.computeIfAbsent(methodNameAndSignature, _ -> new MethodInfo(methodName, methodSignature, className));
6666
return nameAndSignatureToMethodInfoMap.get(methodNameAndSignature);
6767
}
6868

substratevm/src/com.oracle.svm.core.genscavenge/src/com/oracle/svm/core/genscavenge/ChunkedImageHeapPartition.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ private NavigableMap<Long, Queue<ImageHeapObject>> createSortedObjectsMap() {
147147
for (ImageHeapObject obj : objects) {
148148
long objSize = obj.getSize();
149149
assert objSize >= ConfigurationValues.getObjectLayout().getMinImageHeapObjectSize() : Assertions.errorMessage(obj, objSize);
150-
Queue<ImageHeapObject> q = map.computeIfAbsent(objSize, k -> new ArrayDeque<>());
150+
Queue<ImageHeapObject> q = map.computeIfAbsent(objSize, _ -> new ArrayDeque<>());
151151
q.add(obj);
152152
}
153153
return map;

substratevm/src/com.oracle.svm.core.genscavenge/src/com/oracle/svm/core/genscavenge/GCImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public final class GCImpl implements GC {
140140
@Platforms(Platform.HOSTED_ONLY.class)
141141
GCImpl() {
142142
this.policy = CollectionPolicy.getInitialPolicy();
143-
RuntimeSupport.getRuntimeSupport().addShutdownHook(isFirstIsolate -> printGCSummary());
143+
RuntimeSupport.getRuntimeSupport().addShutdownHook(_ -> printGCSummary());
144144
}
145145

146146
@Override

substratevm/src/com.oracle.svm.core.genscavenge/src/com/oracle/svm/core/genscavenge/HeapImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,7 @@ public void visitAlignedChunk(AlignedHeader chunk) {
982982
HeapChunkLogging.logChunk(log, chunk, bottom, top, end, true, "I", false);
983983
}
984984

985+
@Override
985986
public void visitUnalignedChunk(UnalignedHeader chunk) {
986987
Pointer bottom = UnalignedHeapChunk.getObjectStart(chunk);
987988
Pointer top = HeapChunk.getTopPointer(chunk);

substratevm/src/com.oracle.svm.core.graal.aarch64/src/com/oracle/svm/core/graal/aarch64/SubstrateAArch64LoweringProvider.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,9 @@ public void lower(Node n, LoweringTool tool) {
6767
}
6868
}
6969

70-
@SuppressWarnings("try")
7170
public void lowerCodeSynchronizationNode(CodeSynchronizationNode node) {
7271
StructuredGraph graph = node.graph();
73-
try (DebugCloseable position = node.withNodeSourcePosition()) {
72+
try (DebugCloseable _ = node.withNodeSourcePosition()) {
7473
AArch64ISBNode replacement = graph.add(new AArch64ISBNode());
7574
graph.replaceFixed(node, replacement);
7675
}

substratevm/src/com.oracle.svm.core.graal.llvm/src/com/oracle/svm/core/graal/llvm/LLVMNativeImageCodeCache.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public void layoutMethods(DebugContext debug, BigBang bb) {
139139
private void writeBitcode(BatchExecutor executor) {
140140
methodIndex = new HostedMethod[getOrderedCompilations().size()];
141141
AtomicInteger num = new AtomicInteger(-1);
142-
executor.forEach(getOrderedCompilations(), pair -> (debugContext) -> {
142+
executor.forEach(getOrderedCompilations(), pair -> _ -> {
143143
int id = num.incrementAndGet();
144144
methodIndex[id] = pair.getLeft();
145145

@@ -167,7 +167,7 @@ private int createBitcodeBatches(BatchExecutor executor, DebugContext debug) {
167167
/* Avoid empty batches with small batch sizes */
168168
numBatches -= (numBatches * batchSize - methodIndex.length) / batchSize;
169169

170-
executor.forEach(numBatches, batchId -> (debugContext) -> {
170+
executor.forEach(numBatches, batchId -> _ -> {
171171
List<String> batchInputs = IntStream.range(getBatchStart(batchId), getBatchEnd(batchId)).mapToObj(this::getBitcodeFilename)
172172
.collect(Collectors.toList());
173173
llvmLink(debug, getBatchBitcodeFilename(batchId), batchInputs, basePath, this::getFunctionName);
@@ -180,7 +180,7 @@ private int createBitcodeBatches(BatchExecutor executor, DebugContext debug) {
180180
private void compileBitcodeBatches(BatchExecutor executor, DebugContext debug, int numBatches) {
181181
stackMapDumper.startDumpingFunctions();
182182

183-
executor.forEach(numBatches, batchId -> (debugContext) -> {
183+
executor.forEach(numBatches, batchId -> _ -> {
184184
llvmOptimize(debug, getBatchOptimizedFilename(batchId), getBatchBitcodeFilename(batchId), basePath, this::getFunctionName);
185185
llvmCompile(debug, getBatchCompiledFilename(batchId), getBatchOptimizedFilename(batchId), basePath, this::getFunctionName);
186186

@@ -195,7 +195,7 @@ private void linkCompiledBatches(DebugContext debug, BatchExecutor executor, int
195195

196196
LLVMTextSectionInfo textSectionInfo = objectFileReader.parseCode(getLinkedPath());
197197

198-
executor.forEach(getOrderedCompilations(), pair -> (debugContext) -> {
198+
executor.forEach(getOrderedCompilations(), pair -> _ -> {
199199
HostedMethod method = pair.getLeft();
200200
int offset = textSectionInfo.getOffset(method.getUniqueShortName());
201201
int nextFunctionStartOffset = textSectionInfo.getNextOffset(offset);

substratevm/src/com.oracle.svm.core.graal.llvm/src/com/oracle/svm/core/graal/llvm/SubstrateLLVMBackend.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,10 @@ protected CompiledCode createCompiledCode(ResolvedJavaMethod method, Compilation
9797
}
9898

9999
@Override
100-
@SuppressWarnings("try")
101100
public void emitBackEnd(StructuredGraph graph, Object stub, ResolvedJavaMethod installedCodeOwner, CompilationResult result, CompilationResultBuilderFactory factory,
102101
EntryPointDecorator entryPointDecorator, RegisterConfig config, LIRSuites lirSuites) {
103102
DebugContext debug = graph.getDebug();
104-
try (DebugContext.Scope s = debug.scope("BackEnd", graph.getLastSchedule()); DebugCloseable a = BackEnd.start(debug)) {
103+
try (DebugContext.Scope _ = debug.scope("BackEnd", graph.getLastSchedule()); DebugCloseable _ = BackEnd.start(debug)) {
105104
emitLLVM(graph, result);
106105
dumpDebugInfo(result, graph);
107106
} catch (Throwable e) {
@@ -111,10 +110,9 @@ public void emitBackEnd(StructuredGraph graph, Object stub, ResolvedJavaMethod i
111110
}
112111
}
113112

114-
@SuppressWarnings("try")
115113
private void emitLLVM(StructuredGraph graph, CompilationResult result) {
116114
DebugContext debug = graph.getDebug();
117-
try (DebugContext.Scope ds = debug.scope("EmitLLVM"); DebugCloseable a = EmitLLVM.start(debug)) {
115+
try (DebugContext.Scope _ = debug.scope("EmitLLVM"); DebugCloseable _ = EmitLLVM.start(debug)) {
118116
assert graph.isAfterStage(StageFlag.VALUE_PROXY_REMOVAL);
119117

120118
ResolvedJavaMethod method = graph.method();
@@ -126,7 +124,7 @@ private void emitLLVM(StructuredGraph graph, CompilationResult result) {
126124
byte[] bitcode = generator.getBitcode();
127125
result.setTargetCode(bitcode, bitcode.length);
128126

129-
try (DebugContext.Scope s = debug.scope("LIRStages", nodeBuilder, null, null)) {
127+
try (DebugContext.Scope _ = debug.scope("LIRStages", nodeBuilder, null, null)) {
130128
/* Dump LIR along with HIR (the LIR is looked up from context) */
131129
debug.dump(DebugContext.BASIC_LEVEL, graph.getLastSchedule(), "After LIR generation");
132130
} catch (Throwable e) {

0 commit comments

Comments
 (0)