Skip to content

Commit 6073998

Browse files
woessansalond
authored andcommitted
[GR-67852] Backport to 25.0: Merge master into release branch.
PullRequest: js/3570
2 parents 5d379b1 + fa450a6 commit 6073998

File tree

1,182 files changed

+84450
-51700
lines changed

Some content is hidden

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

1,182 files changed

+84450
-51700
lines changed

3rd_party_licenses.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
512512

513513
================================================================================
514514

515-
Node.js 22.15.1
515+
Node.js 22.17.1
516516

517517
Node.js is licensed for use as follows:
518518

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ See [release calendar](https://www.graalvm.org/release-calendar/) for release da
77

88
## Version 25.0.0
99
* ECMAScript 2025 mode/features enabled by default.
10-
* Updated Node.js to version 22.15.1.
10+
* Updated Node.js to version 22.17.1.
1111
* Implemented the [`Intl.DurationFormat`](https://github.com/tc39/proposal-intl-duration-format) proposal.
1212
* Made option `js.text-encoding` stable and allowed in `SandboxPolicy.CONSTRAINED`.
1313
* Implemented the [`import defer`](https://github.com/tc39/proposal-defer-import-eval) proposal. It is available in ECMAScript staging mode (`--js.ecmascript-version=staging`).
1414
* Implemented the [`Upsert`](https://github.com/tc39/proposal-upsert) proposal. It is available in ECMAScript staging mode (`--js.ecmascript-version=staging`).
15+
* Enabled source phase imports from WebAssembly modules (`import source mod from "./mod.wasm"`) by default if the `js.webassembly` option is enabled and the `js.source-phase-imports` option is not explicitly set to `false`.
1516

1617
## Version 24.2.0
1718
* Updated Node.js to version 22.13.1.

ci/common.jsonnet

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ local common_json = import "../common.json";
5656
[name]: jdk_base + common_json.jdks[name] + { jdk_version:: 21 }
5757
for name in ["oraclejdk21"] + variants("labsjdk-ce-21") + variants("labsjdk-ee-21")
5858
} + {
59-
'oraclejdk23': jdk_base + common_json.jdks["oraclejdk23"] + { jdk_version:: 23 },
59+
'oraclejdk24': jdk_base + common_json.jdks["oraclejdk24"] + { jdk_version:: 24 },
6060
} + {
6161
[name]: jdk_base + common_json.jdks[name] + { jdk_version:: parse_labsjdk_version(self), jdk_name:: "jdk-latest"}
6262
for name in ["oraclejdk-latest"] + variants("labsjdk-ce-latest") + variants("labsjdk-ee-latest")
@@ -205,6 +205,12 @@ local common_json = import "../common.json";
205205
},
206206
},
207207

208+
cmake:: {
209+
packages+: {
210+
cmake: "==3.22.2",
211+
},
212+
},
213+
208214
gradle:: {
209215
downloads+: {
210216
GRADLE_JAVA_HOME: jdks_data["oraclejdk21"],
@@ -221,10 +227,8 @@ local common_json = import "../common.json";
221227
# GR-49566: SpotBugs does not yet run on JDK 22
222228
spotbugs: code_tools,
223229

224-
sulong:: {
225-
packages+: {
226-
cmake: "==3.22.2",
227-
} + if self.os == "windows" then {
230+
sulong:: self.cmake + {
231+
packages+: if self.os == "windows" then {
228232
msvc_source: "==14.0",
229233
} else {},
230234
},
@@ -259,7 +263,7 @@ local common_json = import "../common.json";
259263
} else {},
260264
},
261265

262-
graalpy:: self.gradle + {
266+
graalpy:: self.gradle + self.cmake + {
263267
packages+: if (self.os == "linux") then {
264268
libffi: '>=3.2.1',
265269
bzip2: '>=1.0.6',
@@ -286,9 +290,8 @@ local common_json = import "../common.json";
286290
if (self.os == "linux" && self.arch == "amd64") then {
287291
readline: '==6.3',
288292
pcre2: '==10.37',
289-
curl: '==7.50.1',
290293
gnur: '==4.0.3-gcc4.8.5-pcre2',
291-
}
294+
} + if (std.objectHasAll(self, 'os_distro') && self['os_distro'] == 'ol' && std.objectHasAll(self, 'os_distro_version') && self['os_distro_version'] == '9') then {curl: '==7.78.0'} else {curl: '==7.50.1'}
292295
else if (self.os == "darwin" && self.arch == "amd64") then {
293296
'pcre2': '==10.37',
294297
} else {},
@@ -451,18 +454,21 @@ local common_json = import "../common.json";
451454
local aarch64 = { arch:: "aarch64", capabilities+: [self.arch] },
452455

453456
local ol_distro = { os_distro:: "ol" },
457+
local ol7_distro = ol_distro + { os_distro_version:: "7" },
458+
local ol8_distro = ol_distro + { os_distro_version:: "8" },
459+
local ol9_distro = ol_distro + { os_distro_version:: "9" },
454460

455461
linux_amd64: self.linux_amd64_ol7,
456-
linux_amd64_ol7: linux + amd64 + ol7 + ol_distro,
457-
linux_amd64_ol8: linux + amd64 + ol8 + ol_distro,
458-
linux_amd64_ol9: linux + amd64 + ol9 + ol_distro,
462+
linux_amd64_ol7: linux + amd64 + ol7 + ol7_distro,
463+
linux_amd64_ol8: linux + amd64 + ol8 + ol8_distro,
464+
linux_amd64_ol9: linux + amd64 + ol9 + ol9_distro,
459465

460466
linux_aarch64: self.linux_aarch64_ol7,
461-
linux_aarch64_ol7: linux + aarch64 + ol7 + ol_distro,
462-
linux_aarch64_ol8: linux + aarch64 + ol8 + ol_distro,
463-
linux_aarch64_ol9: linux + aarch64 + ol9 + ol_distro,
467+
linux_aarch64_ol7: linux + aarch64 + ol7 + ol7_distro,
468+
linux_aarch64_ol8: linux + aarch64 + ol8 + ol8_distro,
469+
linux_aarch64_ol9: linux + aarch64 + ol9 + ol9_distro,
464470

465-
linux_amd64_ubuntu: linux + amd64 + ubuntu22 + { os_distro:: "ubuntu" },
471+
linux_amd64_ubuntu: linux + amd64 + ubuntu22 + { os_distro:: "ubuntu", os_distro_version:: "22" },
466472

467473
darwin_amd64: darwin + amd64,
468474
darwin_aarch64: darwin + aarch64,

common.json

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

7-
"mx_version": "7.51.2",
7+
"mx_version": "7.54.5",
88

99
"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
1010
"jdks": {
11-
"galahad-jdk": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+22-2657", "platformspecific": true, "extrabundles": ["static-libs"]},
11+
"galahad-jdk": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+26-3156", "platformspecific": true, "extrabundles": ["static-libs"]},
1212

1313
"oraclejdk17": {"name": "jpg-jdk", "version": "17.0.7", "build_id": "jdk-17.0.7+8", "platformspecific": true, "extrabundles": ["static-libs"]},
1414
"labsjdk-ce-17": {"name": "labsjdk", "version": "ce-17.0.7+4-jvmci-23.1-b02", "platformspecific": true },
@@ -43,15 +43,15 @@
4343
"labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21.0.2+13-jvmci-23.1-b33-sulong", "platformspecific": true },
4444
"graalvm-ee-21": {"name": "graalvm-java21", "version": "23.1.6", "platformspecific": true },
4545

46-
"oraclejdk23": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+37", "platformspecific": true, "extrabundles": ["static-libs"]},
46+
"oraclejdk24": {"name": "jpg-jdk", "version": "24", "build_id": "jdk-24.0.1+9", "platformspecific": true, "extrabundles": ["static-libs"]},
4747

48-
"oraclejdk-latest": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+22", "platformspecific": true, "extrabundles": ["static-libs"]},
49-
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-25+22-jvmci-b01", "platformspecific": true },
50-
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-25+22-jvmci-b01-debug", "platformspecific": true },
51-
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-25+22-jvmci-b01-sulong", "platformspecific": true },
52-
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-25+22-jvmci-b01", "platformspecific": true },
53-
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-25+22-jvmci-b01-debug", "platformspecific": true },
54-
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-25+22-jvmci-b01-sulong", "platformspecific": true }
48+
"oraclejdk-latest": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+32", "platformspecific": true, "extrabundles": ["static-libs"]},
49+
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-25+32-jvmci-b01", "platformspecific": true },
50+
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-25+32-jvmci-b01-debug", "platformspecific": true },
51+
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-25+32-jvmci-b01-sulong", "platformspecific": true },
52+
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-25+32-jvmci-b01", "platformspecific": true },
53+
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-25+32-jvmci-b01-debug", "platformspecific": true },
54+
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-25+32-jvmci-b01-sulong", "platformspecific": true }
5555
},
5656

5757
"eclipse": {

graal-js/mx.graal-js/mx_graal_js.py

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
TEST262_REPO = "https://" + "github.com/tc39/test262.git"
5454

5555
# Git revision of Test262 to checkout
56-
TEST262_REV = "3316c0aaf676d657f5a6b33364fa7e579c78ac7f"
56+
TEST262_REV = "942e65f505e9d846c1b995750b5bce8c31d11fce"
5757

5858
# Git repository of V8
5959
TESTV8_REPO = "https://" + "github.com/v8/v8.git"
@@ -529,7 +529,7 @@ def is_included(path):
529529
def mx_register_dynamic_suite_constituents(register_project, register_distribution):
530530
if register_project and register_distribution:
531531
isolate_build_options = ['-H:+AuxiliaryEngineCache', '-H:ReservedAuxiliaryImageBytes=2145482548'] if not mx.is_windows() else []
532-
meta_pom = [p for p in _suite.dists if p.name == 'JS_COMMUNITY'][0]
532+
meta_pom = [p for p in _suite.dists if p.name == 'JS_POM'][0]
533533
mx_truffle.register_polyglot_isolate_distributions(_suite, register_project, register_distribution,'js',
534534
'src', meta_pom.name, meta_pom.maven_group_id(), meta_pom.theLicense,
535535
isolate_build_options=isolate_build_options)
@@ -539,11 +539,9 @@ def is_wasm_available():
539539

540540
# Functions called from suite.py
541541

542-
def has_suite(name):
543-
return mx.suite(name, fatalIfMissing=False)
544-
545542
def graaljs_standalone_deps():
546-
deps = mx_truffle.resolve_truffle_dist_names()
543+
include_truffle_runtime = not mx.env_var_to_bool("EXCLUDE_TRUFFLE_RUNTIME")
544+
deps = mx_truffle.resolve_truffle_dist_names(use_optimized_runtime=include_truffle_runtime)
547545
if is_wasm_available():
548546
deps += ['wasm:WASM']
549547
return deps
@@ -554,6 +552,7 @@ def libjsvm_build_args():
554552
'-H:+AuxiliaryEngineCache',
555553
'-H:ReservedAuxiliaryImageBytes=2145482548',
556554
]
555+
# GR-64948: On GraalVM 21 some Native Image stable options are incorrectly detected as experimental
557556
if mx_sdk_vm_ng.get_bootstrap_graalvm_jdk_version() < mx.VersionSpec("25"):
558557
image_build_args = ['-H:+UnlockExperimentalVMOptions', *image_build_args, '-H:-UnlockExperimentalVMOptions']
559558
return image_build_args
@@ -564,15 +563,6 @@ def libjsvm_build_args():
564563
suite=_suite,
565564
name='Graal.js',
566565
short_name='js',
567-
standalone_dir_name='graaljs-community-<version>-<graalvm_os>-<arch>',
568-
standalone_dir_name_enterprise='graaljs-<version>-<graalvm_os>-<arch>',
569-
standalone_dependencies={
570-
'GraalVM license files': ('', ['GRAALVM-README.md']),
571-
'Graal.js license files': ('', []),
572-
},
573-
standalone_dependencies_enterprise={
574-
'GraalVM enterprise license files': ('', ['GRAALVM-README.md']),
575-
},
576566
license_files=[],
577567
third_party_license_files=[],
578568
dependencies=[
@@ -598,16 +588,23 @@ def libjsvm_build_args():
598588
*(['wasm:WASM'] if is_wasm_available() else [])
599589
],
600590
main_class='com.oracle.truffle.js.shell.JSLauncher',
601-
build_args=[],
591+
build_args=[
592+
# Uncomment to disable JLine FFM provider at native image build time
593+
# '-Dorg.graalvm.shadowed.org.jline.terminal.ffm.disable=true',
594+
'--enable-native-access=org.graalvm.shadowed.jline',
595+
],
602596
build_args_enterprise=[
603597
'-H:+AuxiliaryEngineCache',
604598
'-H:ReservedAuxiliaryImageBytes=2145482548',
605599
] if not mx.is_windows() else [],
606600
language='js',
601+
default_vm_args=[
602+
'--vm.-enable-native-access=org.graalvm.shadowed.jline',
603+
],
604+
# Force launcher and jline on ImageModulePath (needed for --enable-native-access=org.graalvm.shadowed.jline)
605+
use_modules='image',
607606
)
608607
],
609-
boot_jars=[],
610-
installable=True,
611608
stability="supported",
612609
))
613610

@@ -624,7 +621,6 @@ def libjsvm_build_args():
624621
'graal-js:GRAALJS_GRAALVM_LICENSES',
625622
],
626623
priority=5,
627-
installable=True,
628624
stability="supported",
629625
))
630626

@@ -640,7 +636,6 @@ def libjsvm_build_args():
640636
support_distributions=[],
641637
library_configs=[],
642638
boot_jars=[],
643-
installable=True,
644639
stability="supported",
645640
))
646641

graal-js/mx.graal-js/suite.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
{
2626
"name" : "regex",
2727
"subdir" : True,
28-
"version" : "ed067f1f7c575a638991d34bcab15f895a4b26b7",
28+
"version" : "6a816eeb44abca4eb200b5e18db6f64dbd6d44fa",
2929
"urls" : [
3030
{"url" : "https://github.com/oracle/graal.git", "kind" : "git"},
3131
]
@@ -455,6 +455,9 @@
455455
"truffle.attach.library": "../jvmlibs/<lib:truffleattach>",
456456
},
457457
"liblang_relpath": "../lib/<lib:jsvm>",
458+
"default_vm_args": [
459+
"--vm.-enable-native-access=org.graalvm.shadowed.jline",
460+
],
458461
},
459462

460463
"libjsvm": {
@@ -467,6 +470,9 @@
467470
"-Dpolyglot.image-build-time.PreinitializeContexts=js",
468471
# Configure launcher
469472
"-Dorg.graalvm.launcher.class=com.oracle.truffle.js.shell.JSLauncher",
473+
# uncomment to disable JLine FFM provider at native image build time
474+
#"-Dorg.graalvm.shadowed.org.jline.terminal.ffm.disable=true",
475+
"--enable-native-access=org.graalvm.shadowed.jline",
470476
],
471477
"dynamicBuildArgs": "libjsvm_build_args",
472478
},
@@ -477,6 +483,7 @@
477483
"moduleInfo" : {
478484
"name" : "org.graalvm.js",
479485
"exports" : [
486+
"com.oracle.truffle.js.api",
480487
"com.oracle.truffle.js.lang to org.graalvm.truffle",
481488
"com.oracle.js.parser to org.graalvm.nodejs",
482489
"com.oracle.js.parser.ir to org.graalvm.nodejs",
@@ -532,16 +539,15 @@
532539
"useModulePath": True,
533540
},
534541

535-
"JS_COMMUNITY": {
542+
"JS_POM": {
536543
"type": "pom",
537544
"runtimeDependencies": [
538545
"GRAALJS",
539546
"truffle:TRUFFLE_RUNTIME",
540547
],
541-
"description": "GraalJS, a high-performance embeddable JavaScript runtime for Java. This POM dependency includes GraalJS dependencies and Truffle Community Edition.",
542-
"descriptionGFTC": "GraalJS, a high-performance embeddable JavaScript runtime for Java. This POM dependency includes GraalJS dependencies and Truffle.",
548+
"description": "GraalJS, a high-performance embeddable JavaScript runtime for Java. This POM dependency includes GraalJS dependencies and Truffle.",
543549
"maven": {
544-
"artifactId": "js-community",
550+
"artifactId": "js",
545551
"tag": ["default", "public"],
546552
},
547553
"license": [
@@ -877,6 +883,7 @@
877883
"standalone_dist": "GRAALJS_NATIVE_STANDALONE",
878884
"community_archive_name": "graaljs-community",
879885
"enterprise_archive_name": "graaljs",
886+
"language_id": "js",
880887
},
881888

882889
"GRAALJS_JVM_STANDALONE_RELEASE_ARCHIVE": {
@@ -885,6 +892,7 @@
885892
"standalone_dist": "GRAALJS_JVM_STANDALONE",
886893
"community_archive_name": "graaljs-community-jvm",
887894
"enterprise_archive_name": "graaljs-jvm",
895+
"language_id": "js",
888896
},
889897

890898
"JS_INTEROP_MICRO_BENCHMARKS" : {

graal-js/src/com.oracle.js.parser/src/com/oracle/js/parser/ir/ForNode.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2010, 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
@@ -240,9 +240,9 @@ public boolean isForAwaitOf() {
240240
}
241241

242242
/**
243-
* Is this a for-in or for-of statement?
243+
* Is this a for-in, for-of, or for-await-of statement?
244244
*
245-
* @return true if this is a for-in or for-of loop
245+
* @return true if this is a for-in, for-of, or for-await-of loop
246246
*/
247247
public boolean isForInOrOf() {
248248
return isForIn() || isForOf() || isForAwaitOf();

0 commit comments

Comments
 (0)