Fix DoWhileStatementNode labeled continue handling (Issue #1571)

Issue #1571: Labeled continue in do-while loops with allocated blocks
- Proper morphing for labeled continues crossing block boundaries
- Fixes environment record consistency in labeled loops
- Completes fix pattern across all loop statement types

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
Seonghyun Kim 2026-06-15 14:05:38 +09:00 committed by MuHong Byun
commit 09f0a10bba

View file

@ -66,6 +66,12 @@ public:
size_t doEnd = codeBlock->currentCodeSize();
newContext.consumeContinuePositions(codeBlock, testPos, newContext.tryCatchWithBlockStatementCount());
// Consume labeled continues targeting THIS loop with proper morphing (Issue #1571)
if (context->m_currentLoopLabel) {
newContext.consumeLabelledContinuePositions(codeBlock, testPos, context->m_currentLoopLabel, newContext.tryCatchWithBlockStatementCount());
}
newContext.consumeBreakPositions(codeBlock, doEnd, newContext.tryCatchWithBlockStatementCount());
newContext.m_positionToContinue = testPos;
newContext.propagateInformationTo(*context);