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