Skip to content

Commit

Permalink
Reuse SqlRoutine interruption variables
Browse files Browse the repository at this point in the history
  • Loading branch information
pettyjamesm committed May 17, 2024
1 parent dac494c commit 279d9d3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ private BytecodeNode compileLoop(Scope scope, Optional<IrLabel> label, Function<
{
BytecodeBlock block = new BytecodeBlock();

Variable interruption = scope.createTempVariable(int.class);
Variable interruption = scope.getOrCreateTempVariable(int.class);
block.putVariable(interruption, 0);

BytecodeBlock interruptionBlock = new BytecodeBlock()
Expand All @@ -450,6 +450,8 @@ private BytecodeNode compileLoop(Scope scope, Optional<IrLabel> label, Function<
block.visitLabel(breakLabel);
}

scope.releaseTempVariableForReuse(interruption);

return block;
}

Expand Down

0 comments on commit 279d9d3

Please sign in to comment.