/** @since 0.8 or earlier */ public GraphPrintVisitor visit(Object node, GraphPrintHandler handler) { if (openGraphCount == 0) { beginGraph(DEFAULT_GRAPH_NAME); } handler.visit(node, new GraphPrintAdapter()); return this; }
/** @since 0.8 or earlier */ public GraphPrintVisitor visit(Object node, GraphPrintHandler handler) { if (openGraphCount == 0) { beginGraph(DEFAULT_GRAPH_NAME); } handler.visit(node, new GraphPrintAdapter()); return this; }
public GraphPrintVisitor visit(Object node) { if (null == graphElement) { beginGraph("truffle tree");
/** @since 0.8 or earlier */ public GraphPrintVisitor visit(Object node) { if (openGraphCount == 0) { beginGraph(DEFAULT_GRAPH_NAME); } // if node is visited once again, skip if (getElementByObject(node) != null) { return this; } // respect node's custom handler if (!TruffleOptions.AOT && NodeUtil.findAnnotation(node.getClass(), CustomGraphPrintHandler.class) != null) { visit(node, createGraphPrintHandlerFromClass(NodeUtil.findAnnotation(node.getClass(), CustomGraphPrintHandler.class).handler())); } else if (NodeUtil.findAnnotation(node.getClass(), NullGraphPrintHandler.class) != null) { // ignore } else { visit(node, new DefaultGraphPrintHandler()); } return this; }
/** @since 0.8 or earlier */ public GraphPrintVisitor visit(Object node) { if (openGraphCount == 0) { beginGraph(DEFAULT_GRAPH_NAME); } // if node is visited once again, skip if (getElementByObject(node) != null) { return this; } // respect node's custom handler if (!TruffleOptions.AOT && NodeUtil.findAnnotation(node.getClass(), CustomGraphPrintHandler.class) != null) { visit(node, createGraphPrintHandlerFromClass(NodeUtil.findAnnotation(node.getClass(), CustomGraphPrintHandler.class).handler())); } else if (NodeUtil.findAnnotation(node.getClass(), NullGraphPrintHandler.class) != null) { // ignore } else { visit(node, new DefaultGraphPrintHandler()); } return this; }
private static void dumpIGV() { com.oracle.truffle.api.nodes.GraphPrintVisitor printer = new com.oracle.truffle.api.nodes.GraphPrintVisitor(); printer.beginGroup("shapes"); IGVShapeVisitor visitor = new IGVShapeVisitor(printer); for (ShapeImpl shape : getAllShapes()) { if (isRootShape(shape)) { printer.beginGraph(getId(shape) + " (" + calcShapeGraphSize(shape) + ") (" + shape.getObjectType() + ")"); visitor.visitShape(shape); printer.endGraph(); } } printer.beginGraph("all shapes"); for (ShapeImpl shape : getAllShapes()) { if (isRootShape(shape)) { visitor.visitShape(shape); } } printer.endGraph(); printer.endGroup(); printer.printToNetwork(false); }
private static void dumpIGV() { com.oracle.truffle.api.nodes.GraphPrintVisitor printer = new com.oracle.truffle.api.nodes.GraphPrintVisitor(); printer.beginGroup("shapes"); IGVShapeVisitor visitor = new IGVShapeVisitor(printer); for (ShapeImpl shape : getAllShapes()) { if (isRootShape(shape)) { printer.beginGraph(getId(shape) + " (" + calcShapeGraphSize(shape) + ") (" + shape.getObjectType() + ")"); visitor.visitShape(shape); printer.endGraph(); } } printer.beginGraph("all shapes"); for (ShapeImpl shape : getAllShapes()) { if (isRootShape(shape)) { visitor.visitShape(shape); } } printer.endGraph(); printer.endGroup(); printer.printToNetwork(false); }