@@ -63,24 +63,20 @@ void ControlBlocks::compileRepeat(Compiler *compiler)
6363void ControlBlocks::compileRepeatUntil (Compiler *compiler)
6464{
6565 auto substack = compiler->inputBlock (SUBSTACK);
66- if (substack) {
67- compiler->addInstruction (vm::OP_UNTIL_LOOP);
68- compiler->addInput (CONDITION);
69- compiler->addInstruction (vm::OP_BEGIN_UNTIL_LOOP);
70- compiler->moveToSubstack (substack, Compiler::SubstackType::Loop);
71- }
66+ compiler->addInstruction (vm::OP_UNTIL_LOOP);
67+ compiler->addInput (CONDITION);
68+ compiler->addInstruction (vm::OP_BEGIN_UNTIL_LOOP);
69+ compiler->moveToSubstack (substack, Compiler::SubstackType::Loop);
7270}
7371
7472void ControlBlocks::compileRepeatWhile (Compiler *compiler)
7573{
7674 auto substack = compiler->inputBlock (SUBSTACK);
77- if (substack) {
78- compiler->addInstruction (vm::OP_UNTIL_LOOP);
79- compiler->addInput (CONDITION);
80- compiler->addInstruction (vm::OP_NOT);
81- compiler->addInstruction (vm::OP_BEGIN_UNTIL_LOOP);
82- compiler->moveToSubstack (substack, Compiler::SubstackType::Loop);
83- }
75+ compiler->addInstruction (vm::OP_UNTIL_LOOP);
76+ compiler->addInput (CONDITION);
77+ compiler->addInstruction (vm::OP_NOT);
78+ compiler->addInstruction (vm::OP_BEGIN_UNTIL_LOOP);
79+ compiler->moveToSubstack (substack, Compiler::SubstackType::Loop);
8480}
8581
8682void ControlBlocks::compileRepeatForEach (Compiler *compiler)
0 commit comments