Mercurial > hg > truffle
diff truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/NodeUtil.java @ 21966:5023b913e2ba
Help the partial evaluator / language developer by marking API methods as neverPartOfCompilation() when they are too complicated to be compiled.
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Mon, 22 Jun 2015 10:16:27 -0700 |
parents | 9c8c0937da41 |
children | b2d1c8ff592a |
line wrap: on
line diff
--- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/NodeUtil.java Mon Jun 22 10:15:05 2015 -0700 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/NodeUtil.java Mon Jun 22 10:16:27 2015 -0700 @@ -131,6 +131,7 @@ } static Node deepCopyImpl(Node orig) { + CompilerAsserts.neverPartOfCompilation(); final Node clone = orig.copy(); NodeClass nodeClass = clone.getNodeClass(); @@ -168,6 +169,7 @@ } public static List<Node> findNodeChildren(Node node) { + CompilerAsserts.neverPartOfCompilation(); List<Node> nodes = new ArrayList<>(); NodeClass nodeClass = node.getNodeClass(); @@ -197,6 +199,7 @@ } public static boolean replaceChild(Node parent, Node oldChild, Node newChild) { + CompilerAsserts.neverPartOfCompilation(); NodeClass nodeClass = parent.getNodeClass(); for (NodeFieldAccessor nodeField : nodeClass.getChildFields()) { @@ -301,6 +304,7 @@ * @return {@code true} if all children were visited, {@code false} otherwise */ public static boolean forEachChild(Node parent, NodeVisitor visitor) { + CompilerAsserts.neverPartOfCompilation(); Objects.requireNonNull(visitor); NodeClass parentNodeClass = parent.getNodeClass();