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

review fixes

parent 1736c70a
Branches
No related tags found
No related merge requests found
...@@ -215,12 +215,12 @@ public class FileFunctions { ...@@ -215,12 +215,12 @@ public class FileFunctions {
@Override @Override
protected void createCasts(CastBuilder casts) { protected void createCasts(CastBuilder casts) {
casts.toLogical(1); casts.firstBoolean(1, "extra_cols");
} }
@Specialization @Specialization
@TruffleBoundary @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 * 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 * the information. The R closure that called the .Internal turns the result into a
...@@ -234,9 +234,6 @@ public class FileFunctions { ...@@ -234,9 +234,6 @@ public class FileFunctions {
* TODO implement extras_cols=FALSE * TODO implement extras_cols=FALSE
*/ */
controlVisibility(); controlVisibility();
if (RRuntime.isNA(extraCols)) {
throw RError.error(this, RError.Message.INVALID_ARGUMENT, "extra_cols");
}
int vecLength = vec.getLength(); int vecLength = vec.getLength();
Object[] data = new Object[NAMES.length]; Object[] data = new Object[NAMES.length];
boolean[] complete = new boolean[NAMES.length]; boolean[] complete = new boolean[NAMES.length];
......
...@@ -24,6 +24,7 @@ package com.oracle.truffle.r.nodes.builtin.base; ...@@ -24,6 +24,7 @@ package com.oracle.truffle.r.nodes.builtin.base;
import static com.oracle.truffle.r.runtime.RBuiltinKind.*; 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.dsl.*;
import com.oracle.truffle.api.profiles.*; import com.oracle.truffle.api.profiles.*;
import com.oracle.truffle.r.nodes.builtin.*; import com.oracle.truffle.r.nodes.builtin.*;
...@@ -49,6 +50,7 @@ public abstract class Names extends RBuiltinNode { ...@@ -49,6 +50,7 @@ public abstract class Names extends RBuiltinNode {
} }
@Specialization @Specialization
@TruffleBoundary
protected Object getNames(REnvironment env) { protected Object getNames(REnvironment env) {
controlVisibility(); controlVisibility();
return env.ls(true, null, false); return env.ls(true, null, false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment