Update LabelledStatementNode to pass label to child loop

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:25 +09:00
commit 9216bd2a4f

View file

@ -38,7 +38,10 @@ public:
{
size_t start = codeBlock->currentCodeSize();
context->m_positionToContinue = start;
String* previousLoopLabel = context->m_currentLoopLabel;
context->m_currentLoopLabel = m_label;
m_statementNode->generateStatementByteCode(codeBlock, context);
context->m_currentLoopLabel = previousLoopLabel;
size_t end = codeBlock->currentCodeSize();
context->consumeLabelledBreakPositions(codeBlock, end, m_label, context->tryCatchWithBlockStatementCount());
context->consumeLabelledContinuePositions(codeBlock, context->m_positionToContinue, m_label, context->tryCatchWithBlockStatementCount());