Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/Node.java @ 14584:6189c1983cd3
Truffle: make Node#replace accept any CharSequence as reason
author | Andreas Woess <andreas.woess@jku.at> |
---|---|
date | Tue, 18 Mar 2014 13:14:53 +0100 |
parents | 6681b9eb3f4c |
children | a08b8694f556 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/Node.java Tue Mar 18 12:15:48 2014 +0100 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/Node.java Tue Mar 18 13:14:53 2014 +0100 @@ -186,7 +186,7 @@ * @param reason a description of the reason for the replacement * @return the new node */ - public final <T extends Node> T replace(T newNode, String reason) { + public final <T extends Node> T replace(T newNode, CharSequence reason) { CompilerDirectives.transferToInterpreterAndInvalidate(); if (this.getParent() == null) { throw new IllegalStateException("This node cannot be replaced, because it does not yet have a parent."); @@ -260,7 +260,7 @@ return false; } - private void reportReplace(Node oldNode, Node newNode, String reason) { + private void reportReplace(Node oldNode, Node newNode, CharSequence reason) { RootNode rootNode = getRootNode(); if (rootNode != null) { CallTarget target = rootNode.getCallTarget(); @@ -277,13 +277,13 @@ * @param newNode the replacement node * @param reason the reason the replace supplied */ - protected void onReplace(Node newNode, String reason) { + protected void onReplace(Node newNode, CharSequence reason) { if (TruffleOptions.TraceRewrites) { traceRewrite(newNode, reason); } } - private void traceRewrite(Node newNode, String reason) { + private void traceRewrite(Node newNode, CharSequence reason) { if (TruffleOptions.TraceRewritesFilterFromCost != null) { if (filterByKind(this, TruffleOptions.TraceRewritesFilterFromCost)) {