Skip to content

Commit 88c63c7

Browse files
committed
Merge commit 'cf8b4217b18b3e4539cca46b001c402108a498cb' into release/graal-vm/1.0
2 parents e7c1b45 + cf8b421 commit 88c63c7

File tree

234 files changed

+6156
-4050
lines changed

Some content is hidden

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

234 files changed

+6156
-4050
lines changed

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
# 1.0 RC 13
2+
3+
New features:
4+
5+
* new JUL-like logging infrastructure backed by Truffle
6+
* FastR options backed by Truffle now. New command-line format - i.e. bin/r --R.PerformanceWarning="true". Also configurable via org.graal.polyglot.Context.Builder.
7+
* script configure_fastr also regenerates etc/Renviron and etc/ldpaths
8+
* FastR vectors are not writeable from other languages
9+
* in order to update FastR vectors from other languages:
10+
retrieve reference to the subset assign function `` `[<-` `` and execute it.
11+
Note that it will return the new vector with the updated values.
12+
13+
Added missing R builtins and C API
14+
15+
* `polyroot`
16+
* dummy implementation of `pcre_config`
17+
18+
Bug fixes:
19+
20+
* when using GNU-R graphics (--R.UseInternalGridGraphics=false) FastR would still override the graphics package R functions
21+
* cannot install RcppParallel #52
22+
* visibility propagation in `tryCatch`
23+
124
# 1.0 RC 12
225

326
New Features:
@@ -27,6 +50,7 @@ Bug fixes:
2750
* `unlink` error for paths containing wildcard(s) but no path separator
2851
* dims attribute errorneously set to RDoubleVector; exception when retrieving the dims #49
2952
* issues with the dplyr's `mutate` and `transmute`: #50 and #51
53+
* fixed promises result visibility propagation eliminating extra `NULL` output of `tryCatch(cat('Hello\n'))`
3054

3155
# 1.0 RC 11
3256

ci.hocon

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ include "ci_common/common.hocon"
77

88
# The standard set of gate builds. N.B. the style/builtin checks are only run on Linux as they are not OS-dependent.
99

10-
# in case you want to enforce specific overlay commit, uncomment:
11-
# overlay = "1823c758582f31386f8ba4d89157265a23cebd04"
10+
# in case you do not want to enforce a specific overlay commit, comment:
11+
overlay = "f2f27ae819a1f8ce3398aaf43c79aec358acd0a2"
1212
builds = [
1313
${gateTestLinux} {capabilities : [linux, amd64, fast], targets : [gate], name: "gate-test-linux-amd64"}
1414
${gateTestNoDSLCacheLinux} {capabilities : [linux, amd64, fast], targets : [gate], name: "gate-test-linux-amd64-no-dsl-cache"}
1515
${gateTestNoSpecialsLinux} {capabilities : [linux, amd64, fast], targets : [gate], name: "gate-test-linux-amd64-nospecials"}
1616
${gateTestNoDSLCacheNoSpecialsLinux} {capabilities : [linux, amd64, fast], targets : [gate], name: "gate-test-linux-amd64-nospecials-no-dsl-cache"}
17-
${gateTestDarwin} {capabilities : [darwin_sierra, amd64], targets : [gate], name: "gate-test-darwin-amd64"}
17+
${gateTestDarwin} {capabilities : [darwin, amd64], targets : [gate], name: "gate-test-darwin-amd64"}
1818
${gateStyle} {capabilities : [linux, amd64], targets : [gate], name: "gate-style-linux-amd64"}
1919
${gateBuildWithEcj} {capabilities : [linux, amd64], targets : [gate], name: "gate-ecj-linux-amd64"}
2020
# GR-11799

ci_common/common.hocon

Lines changed: 56 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# java 7 is needed by Truffle (for now)
22
java7 : {name : oraclejdk, version : "7", platformspecific: true}
33
# java 8 must be a jvmci enabled variant
4-
java8 : {name : labsjdk, version : "8u192-jvmci-0.52", platformspecific: true}
4+
java8 : {name : labsjdk, version : "8-jvmci-latest", platformspecific: true}
55
java9 : {name : oraclejdk, version : "9.0.4+11", platformspecific: true}
66

77
java8Downloads : {
@@ -50,26 +50,35 @@ logfiles : [
5050
# on the CI cluster. Not all of the modules are needed by FastR but all are needed by the
5151
# embedded GNU R that is built within FastR.
5252

53-
pkgEnvironment: {
53+
environmentLinux: {
5454
environment : {
55-
PKG_INCLUDE_FLAGS_OVERRIDE : """-I/cm/shared/apps/zlib/1.2.11/include -I/cm/shared/apps/bzip2/1.0.6/include -I/cm/shared/apps/xz/5.2.2/include -I/cm/shared/apps/pcre/8.38/include -I/cm/shared/apps/curl/7.50.1/include"""
56-
PKG_LDFLAGS_OVERRIDE : """-L/cm/shared/apps/zlib/1.2.11/lib -L/cm/shared/apps/bzip2/1.0.6/lib -L/cm/shared/apps/xz/5.2.2/lib -L/cm/shared/apps/pcre/8.38/lib -L/cm/shared/apps/curl/7.50.1/lib -L/cm/shared/apps/gcc/4.9.1/lib64"""
57-
TZDIR: "/usr/share/zoneinfo"
55+
PKG_INCLUDE_FLAGS_OVERRIDE : "-I/cm/shared/apps/zlib/1.2.11/include -I/cm/shared/apps/bzip2/1.0.6/include -I/cm/shared/apps/xz/5.2.2/include -I/cm/shared/apps/pcre/8.38/include -I/cm/shared/apps/curl/7.50.1/include"
56+
PKG_LDFLAGS_OVERRIDE : "-L/cm/shared/apps/zlib/1.2.11/lib -L/cm/shared/apps/bzip2/1.0.6/lib -L/cm/shared/apps/xz/5.2.2/lib -L/cm/shared/apps/pcre/8.38/lib -L/cm/shared/apps/curl/7.50.1/lib -L/cm/shared/apps/gcc/4.9.1/lib64"
57+
TZDIR: "/usr/share/zoneinfo"
5858
}
5959
}
6060

61-
packagesLinux : ${pkgEnvironment} {
61+
environmentDarwin : {
62+
environment : {
63+
PATH : "/usr/local/bin:$JAVA_HOME/bin:$PATH"
64+
F77: "/usr/local/bin/gfortran-4.9"
65+
TZDIR: "/usr/share/zoneinfo"
66+
}
67+
}
68+
69+
packagesLinux : {
6270
packages : {
6371
git : ">=1.8.3"
6472
mercurial : ">=2.2"
6573
"pip:astroid" : "==1.1.0"
6674
"pip:pylint" : "==1.1.0"
6775
"pip:ninja_syntax" : "==1.7.2"
6876
make : ">=3.83"
69-
gcc-build-essentials : "==4.9.1" # GCC 4.9.0 fails on cluster
70-
readline : "==6.3"
77+
gcc-build-essentials : "==4.9.1" # TODO: upgrade to 4.9.2
7178
pcre : ">=8.38"
72-
zlib : ">=1.2.11"
79+
zlib : "==1.2.11"
80+
# these are needed to build GNU-R
81+
readline : "==6.3"
7382
curl : ">=7.50.1"
7483
}
7584
}
@@ -79,21 +88,28 @@ packagesDarwin : {
7988
"pip:pylint" : "==1.1.0"
8089
"pip:ninja_syntax" : "==1.7.2"
8190
"pcre" : "==8.38"
91+
"homebrew/gcc" : "==4.9"
8292
}
8393

84-
# Common settings for all builds but note that it uses the Linux package settings,
85-
# so these must be overridden in any darwin builds
94+
# Common settings for all builds
8695

87-
common : ${java8Downloads} ${packagesLinux} {
96+
common : ${java8Downloads} {
8897
logs: ${logfiles}
98+
catch_files : [
99+
"Graal diagnostic output saved in (?P<filename>.+\.zip)"
100+
]
89101
timelimit : "1:00:00"
90102
environment : {
91-
PKG_TEST_ENV_miniUI : "LC_ALL=C"
92-
PKG_TEST_ENV_compare : "LC_ALL=C"
93-
FASTR_OPTION_PrintErrorStacktracesToFile: "true"
103+
FASTR_TEST_trace_tests : "true"
104+
PKG_TEST_ENV_miniUI : "LC_ALL=C"
105+
PKG_TEST_ENV_compare : "LC_ALL=C"
106+
FASTR_OPTION_PrintErrorStacktracesToFile: "true"
94107
}
95108
}
96109

110+
commonLinux: ${common} ${packagesLinux} ${environmentLinux}
111+
commonDarwin: ${common} ${packagesDarwin} ${environmentDarwin}
112+
97113
# Every "pull request" (PR) is subject to a series of "gate" commands that must pass
98114
# for the PR to be accepted into the master branch. The gate commands are run under
99115
# the "mx" tool. This defines a common prefix for all gate commands. The "-t"
@@ -105,17 +121,24 @@ gateCmd : ["mx", "-v", "--strict-compliance", "rgate", "-B=--force-deprecation-a
105121

106122
# The standard set of gate tasks: the actual executable tests are in the "UnitTests" task.
107123

108-
gateTestCommon : ${common} {
124+
gateTestCommon : {
109125
run : [
110126
${gateCmd} ["Versions,JDKReleaseInfo,BuildJavaWithJavac,UnitTests: with specials,Rembedded"]
111127
]
112128
}
113129

114-
gateTestLinux : ${gateTestCommon} {
130+
gateTestLinux : ${gateTestCommon} ${commonLinux}
131+
132+
gateTestDarwin : ${gateTestCommon} ${commonDarwin} {
133+
setup : [
134+
[set-export, PKG_INCLUDE_FLAGS_OVERRIDE, "-I/cm/shared/apps/pcre/8.38/include -I/cm/shared/apps/bzip2/1.0.6/include -I/cm/shared/apps/xz/5.2.2/include -I/cm/shared/apps/curl/7.50.1/include"]
135+
[set-export, MOD_LIB_PATH, [echo, "${LD_LIBRARY_PATH}", |, tr, "\:", "\\n", |, grep, lib/gcc, |, tail, "-1"]]
136+
[set-export, PKG_LDFLAGS_OVERRIDE, "-L/cm/shared/apps/bzip2/1.0.6/lib -L/cm/shared/apps/xz/5.2.2/lib -L/cm/shared/apps/pcre/8.38/lib -L/cm/shared/apps/curl/7.50.1/lib -L${MOD_LIB_PATH} -L/usr/lib"]
137+
]
115138
}
116139

117-
gateTestNoDSLCacheLinux : ${common} {
118-
environment : ${common.environment} {
140+
gateTestNoDSLCacheLinux : ${commonLinux} {
141+
environment : ${common.environment} ${environmentLinux.environment} {
119142
FASTR_RELEASE: "true", # release build so that we also tests recommended pkgs installation
120143
FASTR_OPTION_DSLCacheSizeFactor: "0"
121144
}
@@ -126,14 +149,14 @@ gateTestNoDSLCacheLinux : ${common} {
126149
]
127150
}
128151

129-
gateTestNoSpecialsLinux : ${common} {
152+
gateTestNoSpecialsLinux : ${commonLinux} {
130153
run : [
131154
${gateCmd} ["Versions,JDKReleaseInfo,BuildJavaWithJavac,UnitTests: no specials"]
132155
]
133156
}
134157

135-
gateTestNoDSLCacheNoSpecialsLinux : ${common} {
136-
environment : ${common.environment} {
158+
gateTestNoDSLCacheNoSpecialsLinux : ${commonLinux} {
159+
environment : ${common.environment} ${environmentLinux.environment} {
137160
FASTR_RELEASE: "true", # release build so that we also tests recommended pkgs installation
138161
FASTR_OPTION_DSLCacheSizeFactor: "0"
139162
}
@@ -144,22 +167,8 @@ gateTestNoDSLCacheNoSpecialsLinux : ${common} {
144167
]
145168
}
146169

147-
darwinEnvironment : {
148-
environment : {
149-
PATH : "/usr/local/bin:$JAVA_HOME/bin:$PATH"
150-
F77: "/usr/local/bin/gfortran-4.9"
151-
TZDIR: "/usr/share/zoneinfo"
152-
PKG_INCLUDE_FLAGS_OVERRIDE : """-I/cm/shared/apps/pcre/8.38/include -I/cm/shared/apps/bzip2/1.0.6/include -I/cm/shared/apps/xz/5.2.2/include -I/cm/shared/apps/curl/7.50.1/include"""
153-
PKG_LDFLAGS_OVERRIDE : """-L/cm/shared/apps/bzip2/1.0.6/lib -L/cm/shared/apps/xz/5.2.2/lib -L/cm/shared/apps/pcre/8.38/lib -L/cm/shared/apps/curl/7.50.1/lib -L/cm/shared/apps/gcc/4.9.1/lib64 -L/usr/local/Cellar/[email protected]/4.9.4/lib/gcc/4.9/ -L/usr/lib"""
154-
}
155-
}
156-
157-
gateTestDarwin : ${gateTestCommon} ${darwinEnvironment} {
158-
packages : ${packagesDarwin}
159-
}
160-
161-
gateTestLinuxNFI : ${gateTestCommon} {
162-
environment : {
170+
gateTestLinuxNFI : ${gateTestLinux} {
171+
environment : ${common.environment} ${environmentLinux.environment} {
163172
FASTR_RFFI : "nfi"
164173
TZDIR: "/usr/share/zoneinfo"
165174
}
@@ -172,10 +181,7 @@ requireGCC: {
172181
}
173182
}
174183

175-
gateTestJava9Linux : ${java9Downloads} ${gateTestCommon} {
176-
setup: [
177-
[export, "FASTR_TEST_trace_tests=true"]
178-
]
184+
gateTestJava9Linux : ${java9Downloads} ${gateTestLinux} {
179185
downloads : {
180186
JAVA_HOME : ${java9Downloads.downloads.JAVA_HOME}
181187
EXTRA_JAVA_HOMES : ${java9Downloads.downloads.EXTRA_JAVA_HOMES}
@@ -184,33 +190,33 @@ gateTestJava9Linux : ${java9Downloads} ${gateTestCommon} {
184190

185191
# This performs a number of "style" checks on the code to ensure it confirms to the project standards.
186192

187-
gateStyle : ${common} {
193+
gateStyle : ${commonLinux} {
188194
# need pyhocon fix
189195
downloads : {
190196
JAVA_HOME : ${java8Downloads.downloads.JAVA_HOME}
191197
EXTRA_JAVA_HOMES : ${java8Downloads.downloads.EXTRA_JAVA_HOMES}
192198
JDT : {name: ecj, version: "4.5.1", platformspecific: false}
193199
ECLIPSE : {name: eclipse, version: "4.5.2", platformspecific: true}
194200
}
195-
environment : {
201+
environment : ${common.environment} ${environmentLinux.environment} {
196202
ECLIPSE_EXE : "$ECLIPSE/eclipse"
197203
}
198204
run : [
199-
${gateCmd} ["Versions,JDKReleaseInfo,Pylint,Canonicalization Check,BuildJavaWithJavac,IDEConfigCheck,CodeFormatCheck,Checkstyle,Copyright check,UnitTests: ExpectedTestOutput file check"]
205+
${gateCmd} ["Versions,JDKReleaseInfo,Pylint,Canonicalization Check,BuildJavaWithJavac,SpotBugs,IDEConfigCheck,CodeFormatCheck,Checkstyle,Copyright check,UnitTests: ExpectedTestOutput file check"]
200206
["mx", "clean", "--no-native"]
201207
${gateCmd} ["BuildWithEcj"]
202208
]
203209
}
204210

205-
gateBuildWithEcj : ${common} {
211+
gateBuildWithEcj : ${commonLinux} {
206212
# need pyhocon fix
207213
downloads : {
208214
JAVA_HOME : ${java8Downloads.downloads.JAVA_HOME}
209215
EXTRA_JAVA_HOMES : ${java8Downloads.downloads.EXTRA_JAVA_HOMES}
210216
JDT : {name: ecj, version: "4.5.1", platformspecific: false}
211217
ECLIPSE : {name: eclipse, version: "4.5.2", platformspecific: true}
212218
}
213-
environment : {
219+
environment : ${common.environment} ${environmentLinux.environment} {
214220
ECLIPSE_EXE : "$ECLIPSE/eclipse"
215221
}
216222
run : [
@@ -220,23 +226,23 @@ gateBuildWithEcj : ${common} {
220226

221227
# This check runs diagnostics on the implementation of the R "builtins" in FastR, e.g., that the argument processing is sound.
222228

223-
rbcheck : ${common} {
229+
rbcheck : ${commonLinux} {
224230
run : [
225231
${gateCmd} ["Versions,JDKReleaseInfo,BuildJavaWithJavac"]
226232
["mx", "rbcheck"]
227233
["mx", "rbdiag"]
228234
]
229235
}
230236

231-
internalPkgtest: ${common} {
237+
internalPkgtest: ${commonLinux} {
232238
run : [
233239
["mx", "build"]
234240
["mx", "pkgtest", "--verbose", "--repos", "FASTR", "--pkg-filelist", "com.oracle.truffle.r.test.native/packages/pkg-filelist"]
235241
]
236242
logs: ${common.logs}
237243
}
238244

239-
gnurTests: ${common} {
245+
gnurTests: ${commonLinux} {
240246
run : [
241247
["mx", "build"]
242248
["mx", "gnu-rtests"]

com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/EngineRootNode.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2019, 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
@@ -68,8 +68,9 @@ class EngineRootNode extends RootNode {
6868
this.contextReference = context.getLanguage().getContextReference();
6969
}
7070

71-
public static EngineRootNode createEngineRoot(REngine engine, RContext context, List<RSyntaxNode> statements, SourceSection sourceSection, MaterializedFrame executionFrame) {
72-
return new EngineRootNode(new EngineBodyNode(engine, statements, getPrintResult(sourceSection)), context, sourceSection, executionFrame);
71+
public static EngineRootNode createEngineRoot(REngine engine, RContext context, List<RSyntaxNode> statements, SourceSection sourceSection, MaterializedFrame executionFrame,
72+
boolean forcePrintResult) {
73+
return new EngineRootNode(new EngineBodyNode(engine, statements, forcePrintResult || getPrintResult(sourceSection)), context, sourceSection, executionFrame);
7374
}
7475

7576
/**

com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/REngine.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
import com.oracle.truffle.r.nodes.instrumentation.RInstrumentation;
6262
import com.oracle.truffle.r.runtime.ArgumentsSignature;
6363
import com.oracle.truffle.r.runtime.ExitException;
64-
import com.oracle.truffle.r.runtime.FastROptions;
64+
import static com.oracle.truffle.r.runtime.context.FastROptions.LoadProfiles;
6565
import com.oracle.truffle.r.runtime.JumpToTopLevelException;
6666
import com.oracle.truffle.r.runtime.RArguments;
6767
import com.oracle.truffle.r.runtime.RCaller;
@@ -161,7 +161,7 @@ private void initializeNonShared() {
161161
context.getStateRFFI().initializeVariables(context);
162162
RBuiltinPackages.loadBase(context.getLanguage(), baseFrame);
163163
RGraphics.initialize(context);
164-
if (FastROptions.LoadProfiles.getBooleanValue()) {
164+
if (context.getOption(LoadProfiles)) {
165165
StartupTiming.timestamp("Before Profiles Loaded");
166166
/*
167167
* eval the system/site/user profiles. Experimentally GnuR does not report warnings
@@ -313,7 +313,7 @@ public Object execute(VirtualFrame frame) {
313313
});
314314
} else {
315315
List<RSyntaxNode> statements = parseSource(source);
316-
EngineRootNode rootNode = EngineRootNode.createEngineRoot(this, context, statements, createSourceSection(source, statements), executionFrame);
316+
EngineRootNode rootNode = EngineRootNode.createEngineRoot(this, context, statements, createSourceSection(source, statements), executionFrame, false);
317317
return Truffle.getRuntime().createCallTarget(rootNode);
318318
}
319319
}
@@ -410,7 +410,7 @@ private EngineRootNode createRScriptRoot(Source fullSource, MaterializedFrame fr
410410
} catch (IOException ex) {
411411
throw new RuntimeException(ex);
412412
}
413-
return EngineRootNode.createEngineRoot(this, context, statements, createSourceSection(fullSource, statements), frame);
413+
return EngineRootNode.createEngineRoot(this, context, statements, createSourceSection(fullSource, statements), frame, true);
414414
}
415415

416416
@Override

com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/RFileTypeDetector.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2019, 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
@@ -31,10 +31,12 @@
3131
public final class RFileTypeDetector extends FileTypeDetector {
3232
@Override
3333
public String probeContentType(Path path) throws IOException {
34-
35-
String fileName = path.getFileName().toString();
36-
if (fileName.endsWith(".R") || fileName.endsWith(".r")) {
37-
return RRuntime.R_TEXT_MIME;
34+
Path fileNamePath = path.getFileName();
35+
if (fileNamePath != null) {
36+
String fileName = fileNamePath.toString();
37+
if (fileName.endsWith(".R") || fileName.endsWith(".r")) {
38+
return RRuntime.R_TEXT_MIME;
39+
}
3840
}
3941
return null;
4042
}

com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/RRuntimeASTAccessImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 2019, 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
@@ -251,7 +251,7 @@ private Object findCallerFromFrame(Frame frame) {
251251
caller = caller.getParent();
252252
}
253253
}
254-
if (caller != null && caller.isValidCaller()) {
254+
if (caller.isValidCaller()) {
255255
// This is where we need to ensure that we have an RLanguage object with a rep that
256256
// is an RSyntaxNode.
257257
return getSyntaxCaller(caller);

0 commit comments

Comments
 (0)