Skip to content
Snippets Groups Projects
Commit 3f9ca524 authored by Lukas Stadler's avatar Lukas Stadler
Browse files

[GR-2798] Minor fixes.

PullRequest: fastr/1113
parents 3826aa52 7587e6ef
No related branches found
No related tags found
No related merge requests found
...@@ -104,9 +104,13 @@ public class RCommand { ...@@ -104,9 +104,13 @@ public class RCommand {
} }
public static void main(String[] args) { public static void main(String[] args) {
System.exit(doMain(prependCommand(args), null, System.in, System.out, System.err)); try {
// never returns System.exit(doMain(prependCommand(args), null, System.in, System.out, System.err));
throw fatal("main should never return"); // never returns
throw fatal("main should never return");
} catch (Throwable t) {
throw fatal(t, "error during REPL execution");
}
} }
static String[] prependCommand(String[] args) { static String[] prependCommand(String[] args) {
......
...@@ -32,6 +32,7 @@ import com.oracle.truffle.r.runtime.nodes.RNode; ...@@ -32,6 +32,7 @@ import com.oracle.truffle.r.runtime.nodes.RNode;
import com.oracle.truffle.r.runtime.nodes.RSyntaxCall; import com.oracle.truffle.r.runtime.nodes.RSyntaxCall;
import com.oracle.truffle.r.runtime.nodes.RSyntaxElement; import com.oracle.truffle.r.runtime.nodes.RSyntaxElement;
import com.oracle.truffle.r.runtime.nodes.RSyntaxLookup; import com.oracle.truffle.r.runtime.nodes.RSyntaxLookup;
import com.oracle.truffle.r.runtime.nodes.RSyntaxNode;
/** Marker class for loops. */ /** Marker class for loops. */
public abstract class AbstractLoopNode extends OperatorNode { public abstract class AbstractLoopNode extends OperatorNode {
...@@ -47,9 +48,9 @@ public abstract class AbstractLoopNode extends OperatorNode { ...@@ -47,9 +48,9 @@ public abstract class AbstractLoopNode extends OperatorNode {
if (rootNode instanceof RRootNode) { if (rootNode instanceof RRootNode) {
function = rootNode.toString(); function = rootNode.toString();
} }
SourceSection sourceSection = getSourceSection(); SourceSection sourceSection = getLazySourceSection();
int startLine = -1; int startLine = -1;
if (sourceSection != null) { if (sourceSection != null && sourceSection != RSyntaxNode.LAZY_DEPARSE && sourceSection != RSyntaxNode.INTERNAL && sourceSection != RSyntaxNode.SOURCE_UNAVAILABLE) {
startLine = sourceSection.getStartLine(); startLine = sourceSection.getStartLine();
} }
RSyntaxElement call = ((RSyntaxCall) this).getSyntaxLHS(); RSyntaxElement call = ((RSyntaxCall) this).getSyntaxLHS();
......
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