Mercurial > hg > graal-compiler
changeset 13985:5243fe9a3fbc
SL: adaptions for SL to new inlining API.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Thu, 20 Feb 2014 01:43:51 +0100 |
parents | 1c9dbfc5b510 |
children | bad45cad79ae |
files | graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/SLRootNode.java graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/call/SLDirectDispatchNode.java |
diffstat | 2 files changed, 5 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/SLRootNode.java Thu Feb 20 01:43:11 2014 +0100 +++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/SLRootNode.java Thu Feb 20 01:43:51 2014 +0100 @@ -62,18 +62,13 @@ } @Override - public RootNode inline() { - return new SLRootNode(getFrameDescriptor().shallowCopy(), NodeUtil.cloneNode(uninitializedBodyNode), name); + public boolean isSplittable() { + return true; } @Override - public int getInlineNodeCount() { - return NodeUtil.countNodes(uninitializedBodyNode); - } - - @Override - public boolean isInlinable() { - return true; + public RootNode split() { + return new SLRootNode(getFrameDescriptor().shallowCopy(), NodeUtil.cloneNode(uninitializedBodyNode), name); } @Override
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/call/SLDirectDispatchNode.java Thu Feb 20 01:43:11 2014 +0100 +++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/call/SLDirectDispatchNode.java Thu Feb 20 01:43:51 2014 +0100 @@ -53,7 +53,7 @@ protected SLDirectDispatchNode(SLAbstractDispatchNode next, SLFunction cachedFunction) { this.cachedFunction = cachedFunction; - this.callCachedTargetNode = adoptChild(CallNode.create(cachedFunction.getCallTarget())); + this.callCachedTargetNode = adoptChild(Truffle.getRuntime().createCallNode(cachedFunction.getCallTarget())); this.cachedTargetStable = cachedFunction.getCallTargetStable(); this.nextNode = adoptChild(next); }