Skip to content

Commit dadce43

Browse files
author
Pavel Marek
committed
[GR-19768] Update Truffle import.
PullRequest: fastr/2735
2 parents 7ea0e17 + 93a566d commit dadce43

File tree

9 files changed

+98
-61
lines changed

9 files changed

+98
-61
lines changed

ci.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ overlay : '5eba2d1cff5b42403dee3128c8450e395817a2ae' }
1+
{ overlay : '6ee29a2fa50b3720d21f1dedc89e470620f9994c' }

com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/ReplacementNode.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -65,11 +65,6 @@ abstract class ReplacementNode extends OperatorNode {
6565
this.lhs = lhs;
6666
}
6767

68-
@Override
69-
public final Node deepCopy() {
70-
return RContext.getASTBuilder().process(this).asRNode();
71-
}
72-
7368
public static ReplacementNode create(SourceSection source, RSyntaxLookup operator, RSyntaxLookup variable, RSyntaxElement lhs, RNode rhs, List<RSyntaxCall> calls,
7469
boolean isSuper, int tempNamesStartIndex, boolean isVoid) {
7570
CompilerAsserts.neverPartOfCompilation();

com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/RCallSpecialNode.java

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -22,14 +22,12 @@
2222
*/
2323
package com.oracle.truffle.r.nodes.function;
2424

25-
import com.oracle.truffle.api.CompilerAsserts;
2625
import com.oracle.truffle.api.CompilerDirectives;
2726
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
2827
import com.oracle.truffle.api.dsl.Cached;
2928
import com.oracle.truffle.api.dsl.NodeChild;
3029
import com.oracle.truffle.api.dsl.Specialization;
3130
import com.oracle.truffle.api.frame.VirtualFrame;
32-
import com.oracle.truffle.api.nodes.Node;
3331
import com.oracle.truffle.api.nodes.NodeCost;
3432
import com.oracle.truffle.api.nodes.NodeInfo;
3533
import com.oracle.truffle.api.source.SourceSection;
@@ -176,20 +174,14 @@ public RBaseNode getErrorContext() {
176174
*/
177175
private RCallSpecialNode callSpecialParent;
178176

179-
private final boolean inReplace;
180-
private final int[] ignoredArguments;
181-
182-
private RCallSpecialNode(SourceSection sourceSection, RNode functionNode, RBuiltinDescriptor expectedFunction, RSyntaxNode[] arguments, ArgumentsSignature signature, RNode special,
183-
boolean inReplace, int[] ignoredArguments) {
177+
private RCallSpecialNode(SourceSection sourceSection, RNode functionNode, RBuiltinDescriptor expectedFunction, RSyntaxNode[] arguments, ArgumentsSignature signature, RNode special) {
184178
this.sourceSection = sourceSection;
185179
this.expectedFunction = expectedFunction;
186180
this.special = special;
187181
this.functionNode = functionNode;
188182
this.arguments = arguments;
189183
this.signature = signature;
190184
this.visible = expectedFunction.getVisibility();
191-
this.inReplace = inReplace;
192-
this.ignoredArguments = ignoredArguments;
193185
}
194186

195187
/**
@@ -296,7 +288,7 @@ private static RCallSpecialNode tryCreate(SourceSection sourceSection, RNode fun
296288
RBuiltinDescriptor expectedFunction = RContext.lookupBuiltinDescriptor(name);
297289
RInternalError.guarantee(expectedFunction != null);
298290

299-
RCallSpecialNode callSpecial = new RCallSpecialNode(sourceSection, functionNode, expectedFunction, arguments, signature, special, inReplace, ignoredArguments);
291+
RCallSpecialNode callSpecial = new RCallSpecialNode(sourceSection, functionNode, expectedFunction, arguments, signature, special);
300292
for (int i = 0; i < arguments.length; i++) {
301293
if (!inReplace || !contains(ignoredArguments, i)) {
302294
if (arguments[i] instanceof RCallSpecialNode) {
@@ -348,19 +340,6 @@ public Object execute(VirtualFrame frame, Object function) {
348340
}
349341
}
350342

351-
@Override
352-
public Node deepCopy() {
353-
assert !inReplace && callSpecialParent == null && ignoredArguments.length == 0;
354-
CompilerAsserts.neverPartOfCompilation();
355-
RCallSpecialNode node = (RCallSpecialNode) RContext.getASTBuilder().process(this).asRNode();
356-
node.functionNode = node.insert(node.functionNode);
357-
node.special = node.insert(node.special);
358-
if (node.visibility != null) {
359-
node.visibility = insert(node.visibility);
360-
}
361-
return node;
362-
}
363-
364343
private RCallNode getRCallNode(RSyntaxNode[] newArguments) {
365344
return RCallNode.createCall(sourceSection, functionNode, signature, newArguments);
366345
}

documentation/dev/build-process.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ This build requires `PKG_LDFLAGS_OVERRIDE` environment variable, for example on
267267

268268
or on some Linux distributions
269269

270-
export PKG_LDFLAGS_OVERRIDE="-L/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/
270+
export PKG_LDFLAGS_OVERRIDE="-L/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/"
271271

272272
### Installing recommended packages
273273

documentation/dev/building.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Building FastR from Source
22

3+
TL;DR for devs familiar with GraalVM build tools:
4+
5+
* building locally from fastr directory: `mx r-install-deps && mx --dy /compiler build && mx --dy /compiler R`
6+
* building GraalVM with FastR: `FASTR_RELEASE=1 FASTR_NO_RECOMMENDED=1 FASTR_CAPTURE_DEPENDENCIES=" " mx --env ce-fastr build`
7+
38
Building FastR from source is supported on Mac OS X (El Capitan onwards), and various flavors of Linux.
49
FastR uses a build tool called `mx` (cf `maven`) which can be downloaded from [here](http://github.com/graalvm/mx).
510
`mx` manages software in _suites_, which are normally one-to-one with a `git` repository.
@@ -27,7 +32,7 @@ but it can be further configured by using the following environment variables:
2732
* `FASTR_NO_RECOMMENDED` set to any value turns off the recommended packages build and bundling with FastR. Only applicable if `FASTR_RELEASE` is set.
2833
* `FASTR_CAPTURE_DEPENDENCIES` if exported overrides the set of 3rd party libraries that are bundled with FastR, the value is space separated list of "base" names of the libraries, for example, use `gfortran`, for `libgfortran.so.5`. Libraries that can be bundled are: `libpcre2-8`, `libgfortran`, `libquadmath`, and `libgcc_s`. Only applicable if `FASTR_RELEASE` is set.
2934

30-
Note for maintainers of packages for package managers like apt or yum: it is recommended to **not bundle** any 3rd party libraries with FastR, but instead use the dependency management mechanisms of your package manager. To achieve this, export `FASTR_BUNDLE_DEPENDENCIES` set to an empty value (and build FastR with `FASTR_RELEASE`).
35+
Note for maintainers of packages for package managers like apt or yum: it is recommended to **not bundle** any 3rd party libraries with FastR, but instead use the dependency management mechanisms of your package manager. To achieve this, export `FASTR_CAPTURE_DEPENDENCIES` set to " " (space) and build FastR with `FASTR_RELEASE`.
3136

3237
## Pre-Requisites
3338

documentation/dev/environment-variables.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,14 @@ In this file, we enumerate all the fastr-related environment variables
2121
- A path to prebuilt recommended packages.
2222
- See [Caching recommended packages](building.md#Caching-recommended-packages).
2323
- `FASTR_CAPTURE_DEPENDENCIES`
24-
- List of dependencies to be bundled with FastR, separated by comma.
24+
- Space-separated list of dependencies to be bundled with FastR.
2525
- Used for release builds.
26+
- For example: `export FASTR_CAPTURE_DEPENDENCIES="pcre2-8 gfortran quadmath gcc_s"`
2627
- See [Build modes](building.md#Build-modes).
28+
- `PKG_LDFLAGS_OVERRIDE`
29+
- Where to find dependencies from `FASTR_CAPTURE_DEPENDENCIES`.
30+
- For example: `export PKG_LDFLAGS_OVERRIDE="-L/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/"`
31+
- See [Build process](build-process.md#Release-build)
2732

2833
## Environment variables for development
2934
- `ECLIPSE_EXE`

graal_common.json

Lines changed: 71 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,68 +2,121 @@
22
"README": "This file contains definitions that are useful for the hocon and jsonnet CI files of multiple repositories.",
33
"jdks": {
44
"openjdk11": {
5-
"name": "openjdk",
6-
"version": "11.0.11+9",
5+
"name": "jpg-jdk",
6+
"version": "11.0.11",
7+
"build_id": "9",
8+
"open": true,
9+
"release": true,
710
"platformspecific": true
811
},
912
"oraclejdk11": {
10-
"name": "oraclejdk",
11-
"version": "11.0.11+9",
12-
"platformspecific": true
13+
"name": "jpg-jdk",
14+
"version": "11.0.11",
15+
"build_id": "9",
16+
"release": true,
17+
"platformspecific": true,
18+
"extrabundles": [
19+
"static-libs"
20+
]
1321
},
1422
"labsjdk-ce-11": {
1523
"name": "labsjdk",
16-
"version": "ce-11.0.16+7-jvmci-22.2-b04",
24+
"version": "ce-11.0.16+7-jvmci-22.3-b02",
1725
"platformspecific": true
1826
},
1927
"labsjdk-ce-11-llvm": {
2028
"name": "labsjdk",
21-
"version": "ce-11.0.16+7-jvmci-22.2-b04-sulong",
29+
"version": "ce-11.0.16+7-jvmci-22.3-b02-sulong",
2230
"platformspecific": true
2331
},
2432
"labsjdk-ee-11": {
2533
"name": "labsjdk",
26-
"version": "ee-11.0.16+10-jvmci-22.2-b04",
34+
"version": "ee-11.0.16+10-jvmci-22.3-b02",
2735
"platformspecific": true
2836
},
2937
"labsjdk-ee-11-llvm": {
3038
"name": "labsjdk",
31-
"version": "ee-11.0.16+10-jvmci-22.2-b04-sulong",
39+
"version": "ee-11.0.16+10-jvmci-22.3-b02-sulong",
3240
"platformspecific": true
3341
},
3442
"oraclejdk17": {
35-
"name": "oraclejdk",
36-
"version": "17.0.1+12",
37-
"platformspecific": true
43+
"name": "jpg-jdk",
44+
"version": "17.0.1",
45+
"build_id": "12",
46+
"release": true,
47+
"platformspecific": true,
48+
"extrabundles": [
49+
"static-libs"
50+
]
3851
},
3952
"labsjdk-ce-17": {
4053
"name": "labsjdk",
41-
"version": "ce-17.0.4+7-jvmci-22.2-b04",
54+
"version": "ce-17.0.4+7-jvmci-22.3-b02",
4255
"platformspecific": true
4356
},
4457
"labsjdk-ce-17Debug": {
4558
"name": "labsjdk",
46-
"version": "ce-17.0.4+7-jvmci-22.2-b04-debug",
59+
"version": "ce-17.0.4+7-jvmci-22.3-b02-debug",
4760
"platformspecific": true
4861
},
4962
"labsjdk-ce-17-llvm": {
5063
"name": "labsjdk",
51-
"version": "ce-17.0.4+7-jvmci-22.2-b04-sulong",
64+
"version": "ce-17.0.4+7-jvmci-22.3-b02-sulong",
5265
"platformspecific": true
5366
},
5467
"labsjdk-ee-17": {
5568
"name": "labsjdk",
56-
"version": "ee-17.0.4+10-jvmci-22.2-b04",
69+
"version": "ee-17.0.4+10-jvmci-22.3-b02",
5770
"platformspecific": true
5871
},
5972
"labsjdk-ee-17Debug": {
6073
"name": "labsjdk",
61-
"version": "ee-17.0.4+10-jvmci-22.2-b04-debug",
74+
"version": "ee-17.0.4+10-jvmci-22.3-b02-debug",
6275
"platformspecific": true
6376
},
6477
"labsjdk-ee-17-llvm": {
6578
"name": "labsjdk",
66-
"version": "ee-17.0.4+10-jvmci-22.2-b04-sulong",
79+
"version": "ee-17.0.4+10-jvmci-22.3-b02-sulong",
80+
"platformspecific": true
81+
},
82+
"oraclejdk19": {
83+
"name": "jpg-jdk",
84+
"version": "19",
85+
"build_id": "26",
86+
"release": true,
87+
"platformspecific": true,
88+
"extrabundles": [
89+
"static-libs"
90+
]
91+
},
92+
"labsjdk-ce-19": {
93+
"name": "labsjdk",
94+
"version": "ce-19+27-jvmci-22.3-b02",
95+
"platformspecific": true
96+
},
97+
"labsjdk-ce-19Debug": {
98+
"name": "labsjdk",
99+
"version": "ce-19+27-jvmci-22.3-b02-debug",
100+
"platformspecific": true
101+
},
102+
"labsjdk-ce-19-llvm": {
103+
"name": "labsjdk",
104+
"version": "ce-19+27-jvmci-22.3-b02-sulong",
105+
"platformspecific": true
106+
},
107+
"labsjdk-ee-19": {
108+
"name": "labsjdk",
109+
"version": "ee-19.0.1+1-jvmci-22.3-b02",
110+
"platformspecific": true
111+
},
112+
"labsjdk-ee-19Debug": {
113+
"name": "labsjdk",
114+
"version": "ee-19.0.1+1-jvmci-22.3-b02-debug",
115+
"platformspecific": true
116+
},
117+
"labsjdk-ee-19-llvm": {
118+
"name": "labsjdk",
119+
"version": "ee-19.0.1+1-jvmci-22.3-b02-sulong",
67120
"platformspecific": true
68121
}
69122
},

mx.fastr/mx_fastr.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -453,29 +453,29 @@ def _fastr_gate_runner(args, tasks):
453453
else:
454454
mx.warn('File %s is empty, skipping cran_pkg_test' % list_file)
455455

456-
def common_pkg_tests_args():
456+
def common_pkg_tests_args(graalvm_home: Optional[str] = None):
457457
if "FASTR_REPOS" in os.environ:
458458
repos_arg = os.environ["FASTR_REPOS"]
459459
else:
460460
# SNAPSHOT is transformed by the pkgtest script, where it also checks for FASTR_MRAN_MIRROR env. variable
461461
# FASTR cannot be transformed by the pkgtest script, because it may not know FastR repo home, just graalvm_home
462462
fastr_pkgs_repo = os.path.join(_fastr_suite.dir, 'com.oracle.truffle.r.test.native/packages', 'repo')
463463
repos_arg = "SNAPSHOT,FASTR=file://" + fastr_pkgs_repo
464-
graalvm_home = get_graalvm_home(fatalIfMissing=True)
465-
return ["--graalvm-home", graalvm_home, "--gnur-home", gnur_path(), "--fastr-home", _fastr_suite.dir, "--repos", repos_arg]
464+
_graalvm_home = graalvm_home if graalvm_home else get_graalvm_home(fatalIfMissing=True)
465+
return ["--graalvm-home", _graalvm_home, "--gnur-home", gnur_path(), "--fastr-home", _fastr_suite.dir, "--repos", repos_arg]
466466

467-
def cran_pkg_tests(list_file):
467+
def cran_pkg_tests(list_file, graalvm_home=None):
468468
cache_args = []
469469
cache = os.environ.get('FASTR_PKGS_CACHE_OPT')
470470
if cache is None:
471471
mx.warn("If you want to use R packages cache, export environment variable FASTR_PKGS_CACHE_OPT. See option '--cache-pkgs' of 'mx pkgtest' for the syntax.")
472472
else:
473473
cache_args += ['--cache-pkgs', cache]
474-
result = pkgtest(["--verbose"] + cache_args + common_pkg_tests_args() + ["--pkg-filelist", list_file])
474+
result = pkgtest(["--verbose"] + cache_args + common_pkg_tests_args(graalvm_home) + ["--pkg-filelist", list_file])
475475
if result != 0:
476476
mx.abort("package test failed")
477477

478-
def internal_pkg_tests():
478+
def internal_pkg_tests(graalvm_home: Optional[str] = None):
479479
if not mx.suite("compiler", fatalIfMissing=False) and not mx.suite("graal-enterprise", fatalIfMissing=False):
480480
mx.abort("internal_pkg_tests must only be run with compiler or graal-enterprise suites")
481481
list_file = os.path.join(_fastr_suite.dir, 'com.oracle.truffle.r.test.native/packages/pkg-filelist')
@@ -487,7 +487,7 @@ def internal_pkg_tests():
487487
list_file_gctorture = list_file + '.gctorture'
488488
if os.path.exists(list_file_gctorture):
489489
list_file = list_file_gctorture
490-
result = pkgtest(["--verbose", "--pkg-filelist", list_file] + common_pkg_tests_args())
490+
result = pkgtest(["--verbose", "--pkg-filelist", list_file] + common_pkg_tests_args(graalvm_home))
491491
if result != 0:
492492
mx.abort("internal package test failed")
493493

mx.fastr/suite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"subdir" : True,
1010
# The version must be the same as the version of Sulong
1111
# TRUFFLE REVISION (note: this is a marker for script that can update this)
12-
"version" : "6d51160e2f31f7b7f09b33df760766b823d4a643",
12+
"version" : "1c2c688ddbaa76ec8a153a4027cb8843ea5b5cd5",
1313
"urls" : [
1414
{"url" : "https://github.com/graalvm/graal", "kind" : "git"},
1515
{"url" : "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind" : "binary"},
@@ -20,7 +20,7 @@
2020
"subdir" : True,
2121
# The version must be the same as the version of Truffle
2222
# TRUFFLE REVISION (note: this is a marker for script that can update this)
23-
"version" : "6d51160e2f31f7b7f09b33df760766b823d4a643",
23+
"version" : "1c2c688ddbaa76ec8a153a4027cb8843ea5b5cd5",
2424
"urls" : [
2525
{"url" : "https://github.com/graalvm/graal", "kind" : "git"},
2626
{"url" : "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind" : "binary"},

0 commit comments

Comments
 (0)