Skip to content
Permalink
Browse files
[Truffle] Always split and inline yield.
  • Loading branch information
chrisseaton committed Oct 31, 2014
1 parent ca51c78 commit f2c36e6619486b95bb6a7724e05e615a81c5ab0e
Showing 1 changed file with 11 additions and 0 deletions.
@@ -27,7 +27,18 @@ public class CachedYieldDispatchNode extends YieldDispatchNode {

public CachedYieldDispatchNode(RubyContext context, RubyProc block, YieldDispatchNode next) {
super(context);

callNode = Truffle.getRuntime().createDirectCallNode(block.getCallTarget());
insert(callNode);

if (callNode.isSplittable()) {
callNode.split();
}

if (callNode.isInlinable()) {
callNode.forceInlining();
}

this.next = next;
}

0 comments on commit f2c36e6

Please sign in to comment.