From 7587e6efc2f03e10424e18a48dbe5357ae428b03 Mon Sep 17 00:00:00 2001 From: Lukas Stadler <lukas.stadler@oracle.com> Date: Thu, 17 Aug 2017 11:43:46 +0200 Subject: [PATCH] don't force source sections for loops --- .../com/oracle/truffle/r/nodes/control/AbstractLoopNode.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/AbstractLoopNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/AbstractLoopNode.java index 72a6608175..8b44c6d017 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/AbstractLoopNode.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/AbstractLoopNode.java @@ -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.RSyntaxElement; import com.oracle.truffle.r.runtime.nodes.RSyntaxLookup; +import com.oracle.truffle.r.runtime.nodes.RSyntaxNode; /** Marker class for loops. */ public abstract class AbstractLoopNode extends OperatorNode { @@ -47,9 +48,9 @@ public abstract class AbstractLoopNode extends OperatorNode { if (rootNode instanceof RRootNode) { function = rootNode.toString(); } - SourceSection sourceSection = getSourceSection(); + SourceSection sourceSection = getLazySourceSection(); int startLine = -1; - if (sourceSection != null) { + if (sourceSection != null && sourceSection != RSyntaxNode.LAZY_DEPARSE && sourceSection != RSyntaxNode.INTERNAL && sourceSection != RSyntaxNode.SOURCE_UNAVAILABLE) { startLine = sourceSection.getStartLine(); } RSyntaxElement call = ((RSyntaxCall) this).getSyntaxLHS(); -- GitLab