diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FileFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FileFunctions.java index 228a77e564ec5b31c5ef0751a04f72476fd7994c..d435101253d390993e0dcafca288aaba5c3dbf6a 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FileFunctions.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FileFunctions.java @@ -215,12 +215,12 @@ public class FileFunctions { @Override protected void createCasts(CastBuilder casts) { - casts.toLogical(1); + casts.firstBoolean(1, "extra_cols"); } @Specialization @TruffleBoundary - protected RList doFileInfo(RAbstractStringVector vec, byte extraCols) { + protected RList doFileInfo(RAbstractStringVector vec, @SuppressWarnings("unused") byte extraCols) { /* * Create a list, the elements of which are vectors of length vec.getLength() containing * the information. The R closure that called the .Internal turns the result into a @@ -234,9 +234,6 @@ public class FileFunctions { * TODO implement extras_cols=FALSE */ controlVisibility(); - if (RRuntime.isNA(extraCols)) { - throw RError.error(this, RError.Message.INVALID_ARGUMENT, "extra_cols"); - } int vecLength = vec.getLength(); Object[] data = new Object[NAMES.length]; boolean[] complete = new boolean[NAMES.length]; diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Names.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Names.java index 3cf6799b22be9e11bcda5e21b99de67167f54361..4b577299bd73b3b2e5548df6a3d6878a5cf9851c 100644 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Names.java +++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Names.java @@ -24,6 +24,7 @@ package com.oracle.truffle.r.nodes.builtin.base; import static com.oracle.truffle.r.runtime.RBuiltinKind.*; +import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; import com.oracle.truffle.api.dsl.*; import com.oracle.truffle.api.profiles.*; import com.oracle.truffle.r.nodes.builtin.*; @@ -49,6 +50,7 @@ public abstract class Names extends RBuiltinNode { } @Specialization + @TruffleBoundary protected Object getNames(REnvironment env) { controlVisibility(); return env.ls(true, null, false);