Skip to content

Commit

Permalink
[Truffle] Truffle::Debug.source_attribution_tree
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisseaton committed Jan 28, 2015
1 parent 9fb2a4d commit 54efaca
Showing 1 changed file with 20 additions and 0 deletions.
Expand Up @@ -137,6 +137,26 @@ public RubyString dumpString(RubyString string) {

}

@CoreMethod(names = "source_attribution_tree", onSingleton = true)
public abstract static class SourceAttributionTreeNode extends CoreMethodNode {

public SourceAttributionTreeNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
}

public SourceAttributionTreeNode(SourceAttributionTreeNode prev) {
super(prev);
}

@Specialization
public RubyString sourceAttributionTree() {
notDesignedForCompilation();

return getContext().makeString(NodeUtil.printSourceAttributionTree(Truffle.getRuntime().getCallerFrame().getCallNode().getRootNode()));
}

}

@CoreMethod(names = "storage_class", onSingleton = true, required = 1)
public abstract static class StorageClassNode extends CoreMethodNode {

Expand Down

0 comments on commit 54efaca

Please sign in to comment.