Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/SLRootNode.java @ 18162:ab62800259ff
Truffle: renamed the splitting to callTargetCloning. Made RootNode cloning an implementation detail of the Truffle runtime.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Thu, 23 Oct 2014 17:20:10 +0200 |
parents | e9c119927199 |
children | c88ab4f1f04a |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/SLRootNode.java Thu Oct 23 13:45:59 2014 +0200 +++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/SLRootNode.java Thu Oct 23 17:20:10 2014 +0200 @@ -41,25 +41,16 @@ /** The function body that is executed, and specialized during execution. */ @Child private SLExpressionNode bodyNode; - /** - * A copy of the uninitialized body. When performing method inlining, it is beneficial to inline - * the unspecialized function body, so that it is specialized in the context of the caller. This - * makes the specializations of the inlined function more precise. - */ - private final SLExpressionNode uninitializedBodyNode; - /** The name of the function, for printing purposes only. */ private final String name; /** The Simple execution context for this tree **/ private final SLContext context; - @CompilationFinal private boolean isSplittable; + @CompilationFinal private boolean isCloningAllowed; public SLRootNode(SLContext context, FrameDescriptor frameDescriptor, SLExpressionNode bodyNode, String name) { super(null, frameDescriptor); - /* Deep copy the body before any specialization occurs during execution. */ - this.uninitializedBodyNode = NodeUtil.cloneNode(bodyNode); this.bodyNode = bodyNode; this.name = name; this.context = context; @@ -74,8 +65,8 @@ return name; } - public void setSplittable(boolean isSplittable) { - this.isSplittable = isSplittable; + public void setCloningAllowed(boolean isCloningAllowed) { + this.isCloningAllowed = isCloningAllowed; } public SLExpressionNode getBodyNode() { @@ -83,13 +74,8 @@ } @Override - public boolean isSplittable() { - return isSplittable; - } - - @Override - public RootNode split() { - return new SLRootNode(this.context, getFrameDescriptor().shallowCopy(), NodeUtil.cloneNode(uninitializedBodyNode), name); + public boolean isCloningAllowed() { + return isCloningAllowed; } @Override