From a65d99fb752d02ca7d10a2d604940f7fece50373 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sun, 27 Jan 2013 17:30:40 +0100 Subject: [PATCH] Fix a bug in the evaluation of && Change-Id: Ia446bd05dcca3fc146719284e5ac96d4c7d61c06 Reviewed-by: Erik Verbruggen --- qv4codegen.cpp | 9 ++------- tests/TestExpectations | 4 ---- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/qv4codegen.cpp b/qv4codegen.cpp index 00610cb..0730feb 100644 --- a/qv4codegen.cpp +++ b/qv4codegen.cpp @@ -1095,17 +1095,12 @@ bool Codegen::visit(BinaryExpression *ast) condition(ast->right, _expr.iftrue, _expr.iffalse); } else { IR::BasicBlock *iftrue = _function->newBasicBlock(); - IR::BasicBlock *iffalse = _function->newBasicBlock(); IR::BasicBlock *endif = _function->newBasicBlock(); const unsigned r = _block->newTemp(); - condition(ast->left, iftrue, iffalse); - _block = iffalse; - - move(_block->TEMP(r), _block->CONST(IR::BoolType, 0)); - _block->JUMP(endif); - + move(_block->TEMP(r), *expression(ast->left)); + cjump(_block->TEMP(r), iftrue, endif); _block = iftrue; move(_block->TEMP(r), *expression(ast->right)); _block->JUMP(endif); diff --git a/tests/TestExpectations b/tests/TestExpectations index 3f18771..3b3d390 100644 --- a/tests/TestExpectations +++ b/tests/TestExpectations @@ -13,10 +13,6 @@ S15.1.3.2_A2.5_T1 10.4.3-1-17-s failing 10.4.3-1-63-s failing 10.4.3-1-82-s failing -S11.11.1_A2.1_T1 failing -S11.11.1_A3_T2 failing -S11.11.1_A3_T3 failing -S11.11.1_A3_T4 failing S11.2.1_A3_T1 failing S11.2.1_A3_T2 failing S11.2.1_A3_T3 failing -- 2.7.4