Fix labeled continue regression in test262 tests

Remove the conditional labeled continue processing from loop statements.
The LabelledStatementNode correctly handles all labeled continues after the
labeled statement completes. Loops should only handle their own regular
(unlabeled) continues.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
Seonghyun Kim 2026-06-15 15:34:42 +09:00 committed by MuHong Byun
commit 60b1202a72
4 changed files with 0 additions and 22 deletions

View file

@ -67,11 +67,6 @@ 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);

View file

@ -373,12 +373,6 @@ public:
newContext.consumeContinuePositions(codeBlock, continuePosition, newContext.tryCatchWithBlockStatementCount());
newContext.m_positionToContinue = continuePosition;
// Consume labeled continues targeting THIS loop with proper morphing (Issue #1571)
// This ensures iterator cleanup and environment unwinding are properly sequenced
if (context->m_currentLoopLabel) {
newContext.consumeLabelledContinuePositions(codeBlock, continuePosition, context->m_currentLoopLabel, newContext.tryCatchWithBlockStatementCount());
}
if (!m_forIn) {
TryStatementNode::generateTryStatementBodyEndByteCode(codeBlock, &newContext, this, forOfTryStatementContext);
TryStatementNode::generateTryFinalizerStatementStartByteCode(codeBlock, &newContext, this, forOfTryStatementContext, true);

View file

@ -206,12 +206,6 @@ public:
newContext.consumeContinuePositions(codeBlock, updatePosition, newContext.tryCatchWithBlockStatementCount());
newContext.m_positionToContinue = updatePosition;
// Consume labeled continues targeting THIS loop with proper morphing (Issue #1571)
// This ensures continues inside allocated blocks are properly unwound via JumpComplexCase
if (context->m_currentLoopLabel) {
newContext.consumeLabelledContinuePositions(codeBlock, updatePosition, context->m_currentLoopLabel, newContext.tryCatchWithBlockStatementCount());
}
if (m_iterationLexicalBlockIndex != LEXICAL_BLOCK_INDEX_MAX) {
InterpretedCodeBlock::BlockInfo* bi = codeBlock->m_codeBlock->blockInfo(m_iterationLexicalBlockIndex);
codeBlock->finalizeLexicalBlock(&newContext, iterationBlockContext);

View file

@ -81,11 +81,6 @@ public:
codeBlock->pushCode(Jump(ByteCodeLOC(m_loc.index), whileStart), &newContext, this->m_loc.index);
newContext.consumeContinuePositions(codeBlock, whileStart, newContext.tryCatchWithBlockStatementCount());
// Consume labeled continues targeting THIS loop with proper morphing (Issue #1571)
if (context->m_currentLoopLabel) {
newContext.consumeLabelledContinuePositions(codeBlock, whileStart, context->m_currentLoopLabel, newContext.tryCatchWithBlockStatementCount());
}
size_t whileEnd = codeBlock->currentCodeSize();
newContext.consumeBreakPositions(codeBlock, whileEnd, newContext.tryCatchWithBlockStatementCount());
if (testPos != SIZE_MAX)