Skip to content
Snippets Groups Projects
Commit b09b89d1 authored by Florian Angerer's avatar Florian Angerer
Browse files

Modified taggging semantics to be able to register breakpoints to top-level call statements.

parent 80b65387
Branches
No related tags found
No related merge requests found
...@@ -72,6 +72,7 @@ import com.oracle.truffle.r.runtime.RInternalError; ...@@ -72,6 +72,7 @@ import com.oracle.truffle.r.runtime.RInternalError;
import com.oracle.truffle.r.runtime.RRuntimeASTAccess; import com.oracle.truffle.r.runtime.RRuntimeASTAccess;
import com.oracle.truffle.r.runtime.RSrcref; import com.oracle.truffle.r.runtime.RSrcref;
import com.oracle.truffle.r.runtime.ReturnException; import com.oracle.truffle.r.runtime.ReturnException;
import com.oracle.truffle.r.runtime.RootWithBody;
import com.oracle.truffle.r.runtime.Utils; import com.oracle.truffle.r.runtime.Utils;
import com.oracle.truffle.r.runtime.context.Engine; import com.oracle.truffle.r.runtime.context.Engine;
import com.oracle.truffle.r.runtime.context.RContext; import com.oracle.truffle.r.runtime.context.RContext;
...@@ -520,7 +521,8 @@ class RRuntimeASTAccessImpl implements RRuntimeASTAccess { ...@@ -520,7 +521,8 @@ class RRuntimeASTAccessImpl implements RRuntimeASTAccess {
String className = tag.getSimpleName(); String className = tag.getSimpleName();
switch (className) { switch (className) {
case "CallTag": case "CallTag":
return node instanceof RCallNode; // TODO: should just mark calls to other languages
return false;
case "StatementTag": { case "StatementTag": {
Node parent = ((RInstrumentableNode) node).unwrapParent(); Node parent = ((RInstrumentableNode) node).unwrapParent();
...@@ -541,7 +543,7 @@ class RRuntimeASTAccessImpl implements RRuntimeASTAccess { ...@@ -541,7 +543,7 @@ class RRuntimeASTAccessImpl implements RRuntimeASTAccess {
case "RootTag": { case "RootTag": {
Node parent = ((RInstrumentableNode) node).unwrapParent(); Node parent = ((RInstrumentableNode) node).unwrapParent();
return parent instanceof FunctionDefinitionNode; return parent instanceof FunctionDefinitionNode || parent instanceof RootWithBody;
} }
case "LoopTag": case "LoopTag":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment