Skip to content

Commit 1e21572

Browse files
committed
Merge commit 'c04b36087767a5b26d0b84bce40feaa2bb4b416b' into release/graal-vm/1.0
2 parents 7479476 + c04b360 commit 1e21572

File tree

198 files changed

+19989
-3124
lines changed

Some content is hidden

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

198 files changed

+19989
-3124
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,12 @@ documentation/.pydevproject
147147
com.oracle.truffle.r.native/gnur/patch-build
148148
com.oracle.truffle.r.test.native/embedded/embedded.actual.output
149149
com.oracle.truffle.r.test.native/embedded/main.actual.output
150+
f2c
151+
test.fastr
152+
test.gnur
153+
test.diffs
154+
install.tmp.fastr
155+
install.tmp.gnur
156+
lib.install.packages.fastr
157+
lib.install.packages.gnur
158+
/com.oracle.truffle.r.release/doc/

3rd_party_licenses.txt

Lines changed: 15691 additions & 2107 deletions
Large diffs are not rendered by default.

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
# 1.0 RC 15
2+
3+
* `ActiveBinding` objects do not support the `UNBOX` message anymore
4+
* new Truffle interop converts `double` values to `int` values if they fit in the integer range
5+
* see the changes in the [spec tests](https://github.com/oracle/fastr/commit/e08e2b19571479dddb6167d9a1d492a14cb4c7b2#diff-c842fa11097793b19bd410589c36af99)
6+
7+
Added missing R builtins and C APIa
8+
9+
* simple support for the weak reference API functions (`R_MakeWeakRef`, `R_MakeWeakRefC`, `R_WeakRefKey`, `R_WeakRefValue`)
10+
* `Rf_i1mach`
11+
* `gzcon` builtin for `url` connections, e.g., `load(url('protocol://path'))` should work now
12+
* `Sys.localeconv` supports: `decimal_point`, `thousands_sep`, `grouping`, `int_curr_symbol`, `currency_symbol`, `mon_decimal_point`,
13+
`mon_thousands_sep`, `mon_grouping`, `int_frac_digits`, `p_cs_precedes`, other fields are fixed to some meaningful but not culture
14+
sensitive value for given field
15+
16+
Bug fixes:
17+
18+
* `rep.int` with value argument of length 0 just returns the value argument
19+
* `tcrossprod` called from `apply` did not give correct result #60
20+
* `Rf_lengthgets` can accept `NULL` argument
21+
* FastR does not allow Java interop when not started with `--jvm`
22+
123
# 1.0 RC 14
224

325
* all FastR specific options (NOT those GNU-R compatible like `--save`) are experimental except for `--R.PrintErrorStacktracesToFile`,

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This is a release of GraalVM Community Edition 1.0 R Language Component. This
44
particular copy of the software is released under version 3 of GNU General
55
Public License.
66

7-
Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved
7+
Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved
88

99
===========================================================================
1010

ci.hocon

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ builds = [
2222
${internalPkgtest} {capabilities : [linux, amd64], targets : [gate], name: "gate-internal-pkgtest-linux-amd64"}
2323
${gateTestJava9Linux} {capabilities : [linux, amd64, fast], targets : [gate], name: "gate-test-java9-linux-amd64"}
2424
# ${gnurTests} {capabilities : [linux, amd64, fast], targets : [gate], name: "gate-gnur-tests"}
25+
26+
${coverageLinux} {capabilities : [linux, amd64], targets : [weekly], name: "coverage-r-linux-amd64"}
2527
]

ci_common/common.hocon

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ logfiles : [
6161

6262
environmentLinux: {
6363
environment : {
64-
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"
65-
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"
64+
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.42/include -I/cm/shared/apps/curl/7.50.1/include"
65+
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.42/lib -L/cm/shared/apps/curl/7.50.1/lib -L/cm/shared/apps/gcc/4.9.1/lib64"
6666
TZDIR: "/usr/share/zoneinfo"
6767
}
6868
}
@@ -84,7 +84,7 @@ packagesLinux : {
8484
"pip:ninja_syntax" : "==1.7.2"
8585
make : ">=3.83"
8686
gcc-build-essentials : "==4.9.1" # TODO: upgrade to 4.9.2
87-
pcre : ">=8.38"
87+
pcre : "==8.42"
8888
zlib : "==1.2.11"
8989
# these are needed to build GNU-R
9090
readline : "==6.3"
@@ -96,7 +96,7 @@ packagesDarwin : {
9696
"pip:astroid" : "==1.1.0"
9797
"pip:pylint" : "==1.1.0"
9898
"pip:ninja_syntax" : "==1.7.2"
99-
"pcre" : "==8.38"
99+
"pcre" : "==8.42"
100100
"homebrew/gcc" : "==4.9"
101101
}
102102

@@ -141,9 +141,9 @@ gateTestLinux : ${gateTestCommon} ${commonLinux}
141141

142142
gateTestDarwin : ${gateTestCommon} ${commonDarwin} {
143143
setup : [
144-
[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"]
144+
[set-export, PKG_INCLUDE_FLAGS_OVERRIDE, "-I/cm/shared/apps/pcre/8.42/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"]
145145
[set-export, MOD_LIB_PATH, [echo, "${LD_LIBRARY_PATH}", |, tr, "\:", "\\n", |, grep, lib/gcc, |, tail, "-1"]]
146-
[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"]
146+
[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.42/lib -L/cm/shared/apps/curl/7.50.1/lib -L${MOD_LIB_PATH} -L/usr/lib"]
147147
]
148148
}
149149

@@ -258,3 +258,14 @@ gnurTests: ${commonLinux} {
258258
["mx", "gnu-rtests"]
259259
]
260260
}
261+
262+
263+
coverageLinux : ${commonLinux} {
264+
run : [
265+
// cannot run with excluded "GeneratedBy" since that would lead to "command line too long"
266+
// ["mx", "--jacoco-whitelist-package", "com.oracle.truffle.r", "--jacoco-exclude-annotation", "@GeneratedBy", "--strict-compliance", "rgate", "-B=--force-deprecation-as-warning", "--strict-mode", "-t", "Versions,JDKReleaseInfo,BuildJavaWithJavac,UnitTests: no specials,UnitTests: with specials,Rembedded", "--jacocout", "html"],
267+
// ["mx", "--jacoco-whitelist-package", "com.oracle.truffle.r", "--jacoco-exclude-annotation", "@GeneratedBy", "sonarqube-upload", "-Dsonar.host.url=$SONAR_HOST_URL", "-Dsonar.projectKey=com.oracle.graalvm.r", "-Dsonar.projectName=GraalVM - R", "--exclude-generated"]
268+
["mx", "--jacoco-whitelist-package", "com.oracle.truffle.r", "--strict-compliance", "rgate", "-B=--force-deprecation-as-warning", "--strict-mode", "-t", "Versions,JDKReleaseInfo,BuildJavaWithJavac,UnitTests: no specials,UnitTests: with specials,Rembedded", "--jacocout", "html"],
269+
["mx", "--jacoco-whitelist-package", "com.oracle.truffle.r", "sonarqube-upload", "-Dsonar.host.url=$SONAR_HOST_URL", "-Dsonar.projectKey=com.oracle.graalvm.r", "-Dsonar.projectName=GraalVM - R", "--exclude-generated"]
270+
]
271+
}

com.oracle.truffle.r.engine/src/META-INF/services/java.nio.file.spi.FileTypeDetector

Lines changed: 0 additions & 1 deletion
This file was deleted.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ private static void printValue(RContext ctx, MaterializedFrame callingFrame, Obj
685685
if (result == null) {
686686
str = "[polyglot value (null)]";
687687
} else if (result instanceof CharSequence) {
688-
str = "[1] \"" + String.valueOf(result) + "\"";
688+
str = "[1] \"" + result + "\"";
689689
} else {
690690
str = String.valueOf(result);
691691
}

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

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,24 @@
2323
package com.oracle.truffle.r.engine;
2424

2525
import java.io.IOException;
26-
import java.nio.file.Path;
27-
import java.nio.file.spi.FileTypeDetector;
26+
import java.nio.charset.Charset;
27+
import com.oracle.truffle.api.TruffleFile;
2828

2929
import com.oracle.truffle.r.runtime.RRuntime;
3030

31-
public final class RFileTypeDetector extends FileTypeDetector {
31+
public final class RFileTypeDetector implements TruffleFile.FileTypeDetector {
32+
3233
@Override
33-
public String probeContentType(Path path) throws IOException {
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-
}
34+
public String findMimeType(TruffleFile file) throws IOException {
35+
String fileName = file.getName();
36+
if (fileName != null && (fileName.endsWith(".R") || fileName.endsWith(".r"))) {
37+
return RRuntime.R_TEXT_MIME;
4038
}
4139
return null;
4240
}
41+
42+
@Override
43+
public Charset findEncoding(TruffleFile file) throws IOException {
44+
return null;
45+
}
4346
}

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@
4747
import com.oracle.truffle.r.nodes.builtin.base.printer.DoubleVectorPrinter;
4848
import com.oracle.truffle.r.nodes.builtin.helpers.DebugHandling;
4949
import com.oracle.truffle.r.nodes.builtin.helpers.TraceHandling;
50+
import com.oracle.truffle.r.nodes.control.AbstractBlockNode;
5051
import com.oracle.truffle.r.nodes.control.AbstractLoopNode;
51-
import com.oracle.truffle.r.nodes.control.BlockNode;
52+
import com.oracle.truffle.r.nodes.control.BlockNode.HugeBlockRootNode;
5253
import com.oracle.truffle.r.nodes.control.IfNode;
5354
import com.oracle.truffle.r.nodes.control.ReplacementDispatchNode;
5455
import com.oracle.truffle.r.nodes.function.ClassHierarchyNode;
@@ -281,28 +282,29 @@ public boolean isTaggedWith(Node node, Class<?> tag) {
281282
return node instanceof RCallNode;
282283
}
283284
if (tag == FunctionBodyBlockTag.class) {
284-
return node instanceof BlockNode && ((BlockNode) node).unwrapParent() instanceof RootBodyNode;
285+
return node instanceof AbstractBlockNode && ((AbstractBlockNode) node).unwrapParent() instanceof RootBodyNode;
285286
}
286287
if (tag == LoopTag.class) {
287288
return node instanceof AbstractLoopNode;
288289
}
289290
if (tag == StatementTag.class) {
290-
if (node instanceof BlockNode) {
291+
if (node instanceof AbstractBlockNode) {
291292
// so that the stepping location is not the block itself, but the first statement in
292293
// the block, note that the FastR's own debugging and tracing mechanism uses
293294
// FunctionBodyBlockTag to recognize function bodies.
294295
return false;
295296
}
296297
// How to recognize statement from some node inside a statement (e.g. expression)?
297298
Node parent = ((RInstrumentableNode) node).unwrapParent();
298-
if (parent instanceof BlockNode) {
299+
if (parent instanceof AbstractBlockNode) {
299300
// It's in a block of statements
300301
return true;
301302
} else {
302303
// single statement block: as function body, if/else body, loop body
303304
// note: RepeatingNode is not a RSyntaxElement but the body of a loop is
304305
// under the repeating node !
305-
return parent instanceof RootBodyNode || parent instanceof IfNode || AbstractLoopNode.isLoopBody(node) || EngineRootNode.isEngineBody(parent);
306+
return parent instanceof RootBodyNode || parent instanceof IfNode || AbstractLoopNode.isLoopBody(node) ||
307+
EngineRootNode.isEngineBody(parent) || parent instanceof HugeBlockRootNode;
306308
}
307309
}
308310
// TODO: ExpressionTag: (!statement && !loop && !if && !call && !root)??

0 commit comments

Comments
 (0)