diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/instrumentation/RInstrumentation.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/instrumentation/RInstrumentation.java index 80b354423480cb2b7819a20ccea9f900aabd1361..4f8856e8c6c19f8d3606fe432efc8bb45feb0f7d 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/instrumentation/RInstrumentation.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/instrumentation/RInstrumentation.java @@ -77,7 +77,6 @@ public class RInstrumentation { SourceSection fdns = fdn.getSourceSection(); builder.indexIn(fdns.getCharIndex(), fdns.getCharLength()); builder.sourceIs(fdns.getSource()); - builder.rootSourceSectionEquals(fdns); return builder; } diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test index fcc7c6994e7e025e0b19772f97031420e99e6d1b..3f97cdba2b2cc4d11fecba065e9fc9892a9b84a2 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test @@ -144653,6 +144653,24 @@ debug: print(x) [1] 5 exiting from: f(5) +##com.oracle.truffle.r.test.library.utils.TestInteractiveDebug.testPromise#Ignored.ImplementationError# +#fun <- function(x) { cat({ cat(x); cat('<<<NEWLINE>>>') }) }; debug(fun); fun(3)<<<NEWLINE>>><<<NEWLINE>>><<<NEWLINE>>><<<NEWLINE>>><<<NEWLINE>>> +debugging in: fun(3) +debug at #1: { + cat({ + cat(x) + cat("\n") + }) +} +debug at #1: cat({ + cat(x) + cat("\n") +}) +debug at #1: cat(x) +3debug at #1: cat("\n") + +exiting from: fun(3) + ##com.oracle.truffle.r.test.library.utils.TestInteractiveDebug.testSimple# #f <- function(x) {<<<NEWLINE>>> t <- x + 1<<<NEWLINE>>> print(t)<<<NEWLINE>>> t}<<<NEWLINE>>>debug(f)<<<NEWLINE>>>f(5)<<<NEWLINE>>>x<<<NEWLINE>>>n<<<NEWLINE>>>n<<<NEWLINE>>>t<<<NEWLINE>>>n<<<NEWLINE>>>n debugging in: f(5) diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/utils/TestInteractiveDebug.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/utils/TestInteractiveDebug.java index e74647fcf24fff7e8ffb7e4de186873b31aa74d4..0d5d1b076f0246c735de9e0f352deeefa0c75d38 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/utils/TestInteractiveDebug.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/utils/TestInteractiveDebug.java @@ -59,6 +59,12 @@ public class TestInteractiveDebug extends TestBase { assertEval("bar <- function(x) { for(i in seq(x)) print(x) }; foo <- function(x) { cat('foo entry\\n'); bar(x); cat('foo exit\\n') }; debug(foo); foo(5)\n\n\ns\nn\n\n\nf\n\n"); } + @Test + public void testPromise() { + // TODO enable test as soon as Truffle support is available + assertEval(Ignored.ImplementationError, "fun <- function(x) { cat({ cat(x); cat('\n') }) }; debug(fun); fun(3)\n\n\n\n\n"); + } + @Test public void testNestedDebugging() { assertEval(Output.IgnoreDebugPath,