comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/NodeUtil.java @ 15090:07e7aae05983

Truffle: context sensitive inlining cleanup
author Christian Humer <christian.humer@gmail.com>
date Mon, 14 Apr 2014 18:25:23 +0200
parents 448338c9ce96
children 5634b199c4da
comparison
equal deleted inserted replaced
15089:448338c9ce96 15090:07e7aae05983
636 nodeCount++; 636 nodeCount++;
637 } 637 }
638 638
639 if (visitInlinedCallNodes && node instanceof CallNode) { 639 if (visitInlinedCallNodes && node instanceof CallNode) {
640 CallNode call = (CallNode) node; 640 CallNode call = (CallNode) node;
641 if (call.isInliningForced()) { 641 if (call.isInlined()) {
642 Node target = ((RootCallTarget) call.getCurrentCallTarget()).getRootNode(); 642 Node target = ((RootCallTarget) call.getCurrentCallTarget()).getRootNode();
643 if (target != null) { 643 if (target != null) {
644 target.accept(this); 644 target.accept(this);
645 } 645 }
646 } 646 }
761 } 761 }
762 762
763 /** 763 /**
764 * Prints a human readable form of a {@link Node} AST to the given {@link PrintStream}. This 764 * Prints a human readable form of a {@link Node} AST to the given {@link PrintStream}. This
765 * print method does not check for cycles in the node structure. 765 * print method does not check for cycles in the node structure.
766 * 766 *
767 * @param out the stream to print to. 767 * @param out the stream to print to.
768 * @param node the root node to write 768 * @param node the root node to write
769 */ 769 */
770 public static void printTree(OutputStream out, Node node) { 770 public static void printTree(OutputStream out, Node node) {
771 printTree(new PrintWriter(out), node); 771 printTree(new PrintWriter(out), node);