Skip to content

Commit dc1db71

Browse files
committed
merge with upstream
2 parents 07f8f90 + 0bcc583 commit dc1db71

File tree

496 files changed

+6320
-3737
lines changed

Some content is hidden

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

496 files changed

+6320
-3737
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ env:
4242
MX_GIT_CACHE: refcache
4343
MX_PATH: ${{ github.workspace }}/mx
4444
MX_PYTHON: python3.8
45+
# Enforce experimental option checking in CI (GR-47922)
46+
NATIVE_IMAGE_EXPERIMENTAL_OPTIONS_ARE_FATAL: "true"
4547

4648
permissions:
4749
contents: read # to fetch code (actions/checkout)

ci.jsonnet

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,16 @@ local visualizer = import 'visualizer/ci/ci.jsonnet';
4040

4141
local verify_ci = (import 'ci/ci_common/ci-check.libsonnet').verify_ci;
4242

43+
# JDK latest only works on MacOS Ventura (GR-49652)
44+
local exclude_latest_darwin_amd64(builds) = [b for b in builds if !(import 'ci/ci_common/common-utils.libsonnet').contains(b.name, "labsjdk-latest-darwin-amd64")];
45+
4346
{
4447
# Ensure that non-hidden entries in ci/common.jsonnet and ci/ci_common/common.jsonnet can be resolved.
4548
assert std.length(std.toString(import 'ci/ci_common/common.jsonnet')) > 0,
4649
ci_resources:: (import 'ci/ci_common/ci-resources.libsonnet'),
4750
overlay: graal_common.ci.overlay,
4851
specVersion: "3",
49-
builds: [common.add_excludes_guard(b) for b in (
52+
builds: exclude_latest_darwin_amd64([common.add_excludes_guard(b) for b in (
5053
compiler.builds +
5154
wasm.builds +
5255
espresso.builds +
@@ -59,7 +62,7 @@ local verify_ci = (import 'ci/ci_common/ci-check.libsonnet').verify_ci;
5962
javadoc.builds +
6063
vm.builds +
6164
visualizer.builds
62-
)],
65+
)]),
6366
assert verify_ci(self.builds),
6467
// verify that the run-spec demo works
6568
assert (import "ci/ci_common/run-spec-demo.jsonnet").check(),

ci/common.jsonnet

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,10 @@ local common_json = import "../common.json";
277277
# Keep in sync with com.oracle.svm.hosted.NativeImageOptions#DEFAULT_ERROR_FILE_NAME
278278
" (?P<filename>.+/svm_err_b_\\d+T\\d+\\.\\d+_pid\\d+\\.md)",
279279
],
280+
environment+: {
281+
# Enforce experimental option checking in CI (GR-47922)
282+
NATIVE_IMAGE_EXPERIMENTAL_OPTIONS_ARE_FATAL: "true",
283+
},
280284
},
281285

282286
// OS specific file handling

compiler/src/jdk.graal.compiler.processor/src/jdk/graal/compiler/replacements/processor/GeneratedFoldPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ protected void createHelpers(AbstractProcessor processor, PrintWriter out, Injec
196196
if (processor.getAnnotation(param, processor.getType(INJECTED_PARAMETER_CLASS_NAME)) == null) {
197197
constantArgument(processor, out, deps, argCount, param.asType(), argCount, true);
198198
} else {
199-
out.printf(" assert args.get(%d).isNullConstant();\n", argCount);
199+
out.printf(" assert args.get(%d).isNullConstant() : \"Must be null constant \" + args.get(%d);\n", argCount, argCount);
200200
out.printf(" %s arg%d = %s;\n", param.asType(), argCount, deps.find(processor, (DeclaredType) param.asType()).getExpression(processor, intrinsicMethod));
201201
}
202202
argCount++;

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/core/test/CheckGraalInvariants.java

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@
5151
import java.util.zip.ZipEntry;
5252
import java.util.zip.ZipFile;
5353

54+
import org.graalvm.word.LocationIdentity;
55+
import org.junit.Assert;
56+
import org.junit.Assume;
57+
import org.junit.Test;
58+
5459
import jdk.graal.compiler.api.replacements.Snippet;
5560
import jdk.graal.compiler.api.replacements.Snippet.ConstantParameter;
5661
import jdk.graal.compiler.api.replacements.Snippet.NonNullParameter;
@@ -98,11 +103,6 @@
98103
import jdk.graal.compiler.phases.util.Providers;
99104
import jdk.graal.compiler.runtime.RuntimeProvider;
100105
import jdk.graal.compiler.test.AddExports;
101-
import org.graalvm.word.LocationIdentity;
102-
import org.junit.Assert;
103-
import org.junit.Assume;
104-
import org.junit.Test;
105-
106106
import jdk.internal.misc.Unsafe;
107107
import jdk.vm.ci.code.BailoutException;
108108
import jdk.vm.ci.code.Register;
@@ -219,6 +219,11 @@ public boolean shouldCheckUsage(OptionDescriptor option) {
219219
}
220220
return true;
221221
}
222+
223+
public boolean checkAssertions() {
224+
return true;
225+
}
226+
222227
}
223228

224229
@Test
@@ -339,6 +344,13 @@ public static void runTest(InvariantsTool tool) {
339344
verifiers.add(new VerifyPluginFrameState());
340345
verifiers.add(new VerifyGraphUniqueUsages());
341346
verifiers.add(new VerifyEndlessLoops());
347+
VerifyAssertionUsage assertionUsages = null;
348+
boolean checkAssertions = tool.checkAssertions();
349+
350+
if (checkAssertions) {
351+
assertionUsages = new VerifyAssertionUsage(metaAccess);
352+
verifiers.add(assertionUsages);
353+
}
342354

343355
loadVerifiers(verifiers);
344356

@@ -446,6 +458,15 @@ public static void runTest(InvariantsTool tool) {
446458
}
447459
}
448460

461+
if (assertionUsages != null) {
462+
assert checkAssertions;
463+
try {
464+
assertionUsages.postProcess();
465+
} catch (Throwable e) {
466+
errors.add(e.getMessage());
467+
}
468+
}
469+
449470
checkOptionFieldUsages(errors, optionFieldUsages);
450471

451472
if (!errors.isEmpty()) {

0 commit comments

Comments
 (0)