diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-02-06 15:13:33 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-07 10:44:34 +0100 |
commit | b4883080781f3ea68e4a688821d353a321c39f95 (patch) | |
tree | 1ac13d8c23aea6b3238750e48a32cc9e37ae6730 /src/qml/compiler/qv4isel_moth.cpp | |
parent | aaa8257d988f10f8a6f92d6e687d9aaf678aa05c (diff) |
Remove add/sub/mul instruction specializations for numbers
These instructions did hurt more than help, as they converted
ints to doubles. Since the regular add/sub/mul runtime methods
have fast paths for both ints and doubles, we're better off
using those instead.
Change-Id: I0b7a6f95818943bfc8a0669c1c56f7db4e7246e0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4isel_moth.cpp')
-rw-r--r-- | src/qml/compiler/qv4isel_moth.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/qml/compiler/qv4isel_moth.cpp b/src/qml/compiler/qv4isel_moth.cpp index df102af73b..09f4a88b30 100644 --- a/src/qml/compiler/qv4isel_moth.cpp +++ b/src/qml/compiler/qv4isel_moth.cpp @@ -697,37 +697,6 @@ void InstructionSelection::binop(V4IR::AluOp oper, V4IR::Expr *leftSource, V4IR: Param InstructionSelection::binopHelper(V4IR::AluOp oper, V4IR::Expr *leftSource, V4IR::Expr *rightSource, V4IR::Temp *target) { - if (isNumberType(leftSource) && isNumberType(rightSource)) { - switch (oper) { - case V4IR::OpAdd: { - Instruction::AddNumberParams instr; - instr.lhs = getParam(leftSource); - instr.rhs = getParam(rightSource); - instr.result = getResultParam(target); - addInstruction(instr); - return instr.result; - } - case V4IR::OpMul: { - Instruction::MulNumberParams instr; - instr.lhs = getParam(leftSource); - instr.rhs = getParam(rightSource); - instr.result = getResultParam(target); - addInstruction(instr); - return instr.result; - } - case V4IR::OpSub: { - Instruction::SubNumberParams instr; - instr.lhs = getParam(leftSource); - instr.rhs = getParam(rightSource); - instr.result = getResultParam(target); - addInstruction(instr); - return instr.result; - } - default: - break; - } - } - if (oper == V4IR::OpAdd) { Instruction::Add add; add.lhs = getParam(leftSource); |