Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -27,16 +27,16 @@ public final class WhileNode extends RubyNode {

private WhileNode(RubyContext context, SourceSection sourceSection, RepeatingNode repeatingNode) {
super(context, sourceSection);
this.loopNode = Truffle.getRuntime().createLoopNode(repeatingNode);
loopNode = Truffle.getRuntime().createLoopNode(repeatingNode);
}

public static WhileNode createWhile(RubyContext context, SourceSection sourceSection, RubyNode condition, RubyNode body) {
RepeatingNode repeatingNode = new WhileRepeatingNode(context, condition, body);
final RepeatingNode repeatingNode = new WhileRepeatingNode(context, condition, body);
return new WhileNode(context, sourceSection, repeatingNode);
}

public static WhileNode createDoWhile(RubyContext context, SourceSection sourceSection, RubyNode condition, RubyNode body) {
RepeatingNode repeatingNode = new DoWhileRepeatingNode(context, condition, body);
final RepeatingNode repeatingNode = new DoWhileRepeatingNode(context, condition, body);
return new WhileNode(context, sourceSection, repeatingNode);
}

@@ -90,10 +90,6 @@ public boolean executeRepeating(VirtualFrame frame) {
}
}

@Override
public String toString() {
return condition.getEncapsulatingSourceSection().getShortDescription();
}

This comment has been minimized.

Copy link
@eregon

eregon Feb 24, 2016

Member

This was used for the output in OSR compilation name, has this changed?

This comment has been minimized.

Copy link
@chrisseaton

chrisseaton Feb 24, 2016

Author Contributor

Didn't realise - fixed.

}

private static class DoWhileRepeatingNode extends WhileRepeatingBaseNode implements RepeatingNode {

0 comments on commit 6ee231d

Please sign in to comment.