Skip to content

Commit 5063141

Browse files
committed
Remove unused RubyContext argument in WhileRepeatingBaseNode
1 parent a3d23b7 commit 5063141

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/main/java/org/truffleruby/language/control/WhileNode.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private static abstract class WhileRepeatingBaseNode extends RubyContextNode imp
4747
protected final BranchProfile redoUsed = BranchProfile.create();
4848
protected final BranchProfile nextUsed = BranchProfile.create();
4949

50-
public WhileRepeatingBaseNode(RubyContext context, RubyNode condition, RubyNode body) {
50+
public WhileRepeatingBaseNode(RubyNode condition, RubyNode body) {
5151
this.condition = BooleanCastNodeGen.create(condition);
5252
this.body = body;
5353
}
@@ -61,8 +61,8 @@ public String toString() {
6161

6262
public static class WhileRepeatingNode extends WhileRepeatingBaseNode implements RepeatingNode {
6363

64-
public WhileRepeatingNode(RubyContext context, RubyNode condition, RubyNode body) {
65-
super(context, condition, body);
64+
public WhileRepeatingNode(RubyNode condition, RubyNode body) {
65+
super(condition, body);
6666
}
6767

6868
@Override
@@ -90,8 +90,8 @@ public boolean executeRepeating(VirtualFrame frame) {
9090

9191
public static class DoWhileRepeatingNode extends WhileRepeatingBaseNode implements RepeatingNode {
9292

93-
public DoWhileRepeatingNode(RubyContext context, RubyNode condition, RubyNode body) {
94-
super(context, condition, body);
93+
public DoWhileRepeatingNode(RubyNode condition, RubyNode body) {
94+
super(condition, body);
9595
}
9696

9797
@Override

src/main/java/org/truffleruby/parser/BodyTranslator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3258,9 +3258,9 @@ private RubyNode translateWhileNode(WhileParseNode node, boolean conditionInvers
32583258
final RubyNode loop;
32593259

32603260
if (node.evaluateAtStart()) {
3261-
loop = new WhileNode(new WhileNode.WhileRepeatingNode(context, condition, body));
3261+
loop = new WhileNode(new WhileNode.WhileRepeatingNode(condition, body));
32623262
} else {
3263-
loop = new WhileNode(new WhileNode.DoWhileRepeatingNode(context, condition, body));
3263+
loop = new WhileNode(new WhileNode.DoWhileRepeatingNode(condition, body));
32643264
}
32653265

32663266
final RubyNode ret = new CatchBreakNode(whileBreakID, loop, true);

src/main/java/org/truffleruby/parser/TranslatorDriver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ public RubyRootNode parse(RubySource rubySource, ParserContext parserContext, St
316316
sourceIndexLength,
317317
Arrays.asList(new ChompLoopNode(), truffleNode));
318318
}
319-
truffleNode = new WhileNode(new WhileNode.WhileRepeatingNode(context, new KernelGetsNode(), truffleNode));
319+
truffleNode = new WhileNode(new WhileNode.WhileRepeatingNode(new KernelGetsNode(), truffleNode));
320320
}
321321

322322
if (beginNode != null) {

0 commit comments

Comments
 (0)