本文整理了Java中com.oracle.truffle.api.nodes.Node.reportReplace()
方法的一些代码示例,展示了Node.reportReplace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.reportReplace()
方法的具体详情如下:
包路径:com.oracle.truffle.api.nodes.Node
类名称:Node
方法名:reportReplace
暂无
代码示例来源:origin: com.oracle.truffle/truffle-api
final void replaceHelper(Node newNode, CharSequence reason) {
CompilerAsserts.neverPartOfCompilation("do not call Node.replaceHelper from compiled code");
assert inAtomicBlock();
if (this.getParent() == null) {
throw new IllegalStateException("This node cannot be replaced, because it does not yet have a parent.");
}
// (aw) need to set parent *before* replace, so that (unsynchronized) getRootNode()
// will always find the root node
newNode.parent = this.parent;
if (!NodeUtil.replaceChild(this.parent, this, newNode, true)) {
this.parent.adoptUnadoptedHelper(newNode);
}
reportReplace(this, newNode, reason);
onReplace(newNode, reason);
}
代码示例来源:origin: org.graalvm.truffle/truffle-api
final void replaceHelper(Node newNode, CharSequence reason) {
CompilerAsserts.neverPartOfCompilation("do not call Node.replaceHelper from compiled code");
assert inAtomicBlock();
if (this.getParent() == null) {
throw new IllegalStateException("This node cannot be replaced, because it does not yet have a parent.");
}
// (aw) need to set parent *before* replace, so that (unsynchronized) getRootNode()
// will always find the root node
newNode.parent = this.parent;
if (!NodeUtil.replaceChild(this.parent, this, newNode, true)) {
this.parent.adoptUnadoptedHelper(newNode);
}
reportReplace(this, newNode, reason);
onReplace(newNode, reason);
}
代码示例来源:origin: com.oracle/truffle
final void replaceHelper(Node newNode, CharSequence reason) {
CompilerAsserts.neverPartOfCompilation();
assert inAtomicBlock();
if (this.getParent() == null) {
throw new IllegalStateException("This node cannot be replaced, because it does not yet have a parent.");
}
if (sourceSection != null && newNode.getSourceSection() == null) {
// Pass on the source section to the new node.
newNode.assignSourceSection(sourceSection);
}
// (aw) need to set parent *before* replace, so that (unsynchronized) getRootNode()
// will always find the root node
newNode.parent = this.parent;
if (NodeUtil.replaceChild(this.parent, this, newNode)) {
this.parent.adoptHelper(newNode);
} else {
this.parent.adoptUnadoptedHelper(newNode);
}
reportReplace(this, newNode, reason);
onReplace(newNode, reason);
}
内容来源于网络,如有侵权,请联系作者删除!