aboutsummaryrefslogtreecommitdiffstats
path: root/qv4isel_masm.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-12-02 19:34:50 +0100
committerLars Knoll <lars.knoll@digia.com>2012-12-04 22:58:00 +0100
commitf75c05b7d2495ad4b87e57472ebff745048721d9 (patch)
treed5dbcdd186280d154d88f19e4f3c664601d4379d /qv4isel_masm.cpp
parentf4e8ad5e609921e677e579e01020930c64f652ba (diff)
[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 <lars.knoll@digia.com>
Diffstat (limited to 'qv4isel_masm.cpp')
-rw-r--r--qv4isel_masm.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/qv4isel_masm.cpp b/qv4isel_masm.cpp
index bb9e224302..a0787a09a2 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);