From 0b886a07b0d766f39f90c91193faf438b462597a Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 23 Jan 2013 21:47:44 +0100 Subject: [PATCH] Labelled statements can also appear outside of loops Change-Id: I121b9341dd102964f52dec2a0278c2a3d74b9a8a Reviewed-by: Simon Hausmann --- qv4codegen.cpp | 2 +- tests/TestExpectations | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/qv4codegen.cpp b/qv4codegen.cpp index da2a17c..46a228e 100644 --- a/qv4codegen.cpp +++ b/qv4codegen.cpp @@ -2172,7 +2172,7 @@ bool Codegen::visit(LabelledStatement *ast) AST::cast(ast->statement) || AST::cast(ast->statement)) { statement(ast->statement); // labelledStatement will be associated with the ast->statement's loop. - } else if (_loop) { + } else { IR::BasicBlock *breakBlock = _function->newBasicBlock(); enterLoop(ast->statement, breakBlock, /*continueBlock*/ 0); statement(ast->statement); diff --git a/tests/TestExpectations b/tests/TestExpectations index 8891965..0db14a4 100644 --- a/tests/TestExpectations +++ b/tests/TestExpectations @@ -197,9 +197,6 @@ S15.1.2.1_A4.2 failing S15.1.2.1_A4.3 failing S15.1.2.1_A4.4 failing S15.1.2.1_A4.7 failing -S12.8_A4_T1 failing -S12.8_A4_T2 failing -S12.8_A4_T3 failing S15.12.2_A1 failing 15.2.3.6-4-360-3 failing 15.2.3.6-4-360-7 failing -- 2.7.4