mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
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:
parent
7e2b3292fd
commit
09f0a10bba
1 changed files with 6 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue