Skip to content
Snippets Groups Projects
Commit 8aa72980 authored by Mick Jordan's avatar Mick Jordan
Browse files

Merge branch 'master' into feature/internal-pkgtest

parents 34136bc0 6c2ef442
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,7 @@ NATIVE_PROJECT := $(subst native.recommended,native,$(CURDIR))
R_VERSION := $(notdir $(wildcard $(NATIVE_PROJECT)/gnur/R-*))
GNUR_HOME := $(NATIVE_PROJECT)/gnur/$(R_VERSION)
# order matters due to inter-package dependencies
GNUR_RECOMMENDED_PKGNAMES := MASS boot class cluster lattice nnet spatial Matrix survival KernSmooth foreign nlme rpart codetools
GNUR_RECOMMENDED_PKGNAMES := codetools MASS boot class cluster lattice nnet spatial Matrix survival KernSmooth foreign nlme rpart
GNUR_RECOMMENDED_TARS := $(foreach pkg, $(GNUR_RECOMMENDED_PKGNAMES),$(GNUR_HOME)/src/library/Recommended/$(pkg).tgz)
#$(info GNUR_RECOMMENDED_TARS=$(GNUR_RECOMMENDED_TARS))
......
......@@ -212,33 +212,19 @@ public class RASTUtils {
* Create an {@link RCallNode}. Where {@code fn} is either a:
* <ul>
* <li>{@link RFunction}\
* <li>{@code ConstantFunctionNode}</li>
* <li>{@code ConstantStringNode}</li>
* <li>{@link ReadVariableNode}</li>
* <li>{@link RCallNode}</li>
* <li>GroupDispatchNode</li>
* <li>{@code RNode}</li>
* </ul>
*/
@TruffleBoundary
public static RSyntaxNode createCall(Object fna, boolean sourceUnavailable, ArgumentsSignature signature, RSyntaxNode... arguments) {
Object fn = fna;
if (fn instanceof Node) {
fn = unwrap(fn);
}
if (fn instanceof ConstantNode) {
fn = ((ConstantNode) fn).getValue();
}
SourceSection sourceSection = sourceUnavailable ? RSyntaxNode.SOURCE_UNAVAILABLE : RSyntaxNode.EAGER_DEPARSE;
if (fn instanceof ReadVariableNode) {
return RCallSpecialNode.createCall(sourceSection, (ReadVariableNode) fn, signature, arguments);
} else if (fn instanceof RCallBaseNode) {
return RCallSpecialNode.createCall(sourceSection, (RCallBaseNode) fn, signature, arguments);
public static RSyntaxNode createCall(Object fn, boolean sourceUnavailable, ArgumentsSignature signature, RSyntaxNode... arguments) {
RNode fnNode;
if (fn instanceof RFunction) {
fnNode = ConstantNode.create(fn);
} else {
// apart from RFunction, this of course would not make much sense if trying to evaluate
// this call, yet it's syntactically possible, for example as a result of:
// f<-function(x,y) sys.call(); x<-f(7, 42); x[c(2,3)]
return RCallSpecialNode.createCall(sourceSection, ConstantNode.create(fn), signature, arguments);
fnNode = (RNode) unwrap(fn);
}
SourceSection sourceSection = sourceUnavailable ? RSyntaxNode.SOURCE_UNAVAILABLE : RSyntaxNode.EAGER_DEPARSE;
return RCallSpecialNode.createCall(sourceSection, fnNode, signature, arguments);
}
@TruffleBoundary
......
......@@ -40,14 +40,12 @@ import com.oracle.truffle.r.test.TestBase;
* directory by the com.oracle.truffle.r.test.native Makefile. to allow them to be packaged into a
* distribution and avoid any dependency on source paths.
*
* FIXME {@codetools} is installed last because when it is installed, some of the other packages use
* it and it currently provokes a bug.
*/
public class TestRecommendedPackages extends TestRPackages {
// order matters due to dependencies
private static final String[] DEFAULT_PACKAGES = new String[]{"MASS", "boot", "class", "cluster",
private static final String[] DEFAULT_PACKAGES = new String[]{"codetools", "MASS", "boot", "class", "cluster",
"lattice", "nnet", "spatial", "Matrix", "survival", "KernSmooth", "foreign", "nlme",
"rpart", "codetools"};
"rpart"};
private static String[] packages = DEFAULT_PACKAGES;
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment