Skip to content
Snippets Groups Projects
Commit 5095715d authored by Lukas Stadler's avatar Lukas Stadler
Browse files

use voidExecute in loops

parent dfc6b7b9
No related branches found
No related tags found
No related merge requests found
......@@ -125,8 +125,8 @@ public final class ForNode extends AbstractLoopNode implements RSyntaxNode, RSyn
}
try {
if (conditionProfile.profile(index <= length)) {
writeElementNode.execute(frame);
body.execute(frame);
writeElementNode.voidExecute(frame);
body.voidExecute(frame);
return true;
} else {
return false;
......
......@@ -73,7 +73,7 @@ public final class RepeatNode extends AbstractLoopNode implements RSyntaxNode, R
@Override
public boolean executeRepeating(VirtualFrame frame) {
try {
body.execute(frame);
body.voidExecute(frame);
normalBlock.enter();
return true;
} catch (BreakException e) {
......
......@@ -82,7 +82,7 @@ public final class WhileNode extends AbstractLoopNode implements RSyntaxNode, RS
public boolean executeRepeating(VirtualFrame frame) {
try {
if (conditionProfile.profile(condition.executeByte(frame) == RRuntime.LOGICAL_TRUE)) {
body.execute(frame);
body.voidExecute(frame);
normalBlock.enter();
return true;
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment