mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-15 01:13:48 +01:00
Move break
assert before comment
This commit is contained in:
parent
485773ca82
commit
a22d4803bb
1 changed files with 2 additions and 1 deletions
|
@ -2465,9 +2465,10 @@ struct Compiler
|
||||||
}
|
}
|
||||||
else if (node->is<AstStatBreak>())
|
else if (node->is<AstStatBreak>())
|
||||||
{
|
{
|
||||||
|
LUAU_ASSERT(!loops.empty());
|
||||||
|
|
||||||
// before exiting out of the loop, we need to close all local variables that were captured in closures since loop start
|
// before exiting out of the loop, we need to close all local variables that were captured in closures since loop start
|
||||||
// normally they are closed by the enclosing blocks, including the loop block, but we're skipping that here
|
// normally they are closed by the enclosing blocks, including the loop block, but we're skipping that here
|
||||||
LUAU_ASSERT(!loops.empty());
|
|
||||||
closeLocals(loops.back().localOffset);
|
closeLocals(loops.back().localOffset);
|
||||||
|
|
||||||
size_t label = bytecode.emitLabel();
|
size_t label = bytecode.emitLabel();
|
||||||
|
|
Loading…
Add table
Reference in a new issue