From: Simon Hausmann Date: Sun, 2 Dec 2012 18:34:50 +0000 (+0100) Subject: [masm] Cleanup: avoid redundant convertToValue() call in binop generation X-Git-Tag: upstream/5.2.1~669^2~659^2~754 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f75c05b7d2495ad4b87e57472ebff745048721d9;p=platform%2Fupstream%2Fqtdeclarative.git [masm] Cleanup: avoid redundant convertToValue() call in binop generation We already do that conversion to a constant VM::Value earlier. Change-Id: I142435f2be7c841f322ccfc34473b23cf85e6b5c Reviewed-by: Lars Knoll --- diff --git a/qv4isel_masm.cpp b/qv4isel_masm.cpp index bb9e224..a0787a0 100644 --- a/qv4isel_masm.cpp +++ b/qv4isel_masm.cpp @@ -803,8 +803,8 @@ void InstructionSelection::generateBinOp(IR::AluOp operation, IR::Temp* target, return; } - VM::Value leftConst; - VM::Value rightConst; + Value leftConst = Value::undefinedValue(); + Value rightConst = Value::undefinedValue(); bool canDoInline = info.inlineMemOp && info.inlineImmOp; @@ -853,8 +853,7 @@ void InstructionSelection::generateBinOp(IR::AluOp operation, IR::Temp* target, overflowCheck = (this->*info.inlineMemOp)(Overflow, rightValue, IntegerOpRegister); } else { // right->asConst() - VM::Value value = convertToValue(right->asConst()); - overflowCheck = (this->*info.inlineImmOp)(Overflow, TrustedImm32(value.integerValue()), IntegerOpRegister); + overflowCheck = (this->*info.inlineImmOp)(Overflow, TrustedImm32(rightConst.integerValue()), IntegerOpRegister); } Address resultAddr = loadTempAddress(ScratchRegister, target);