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/jsruntime/qv4vme_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/jsruntime/qv4vme_moth.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4vme_moth.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp index 3d7ce0efcf..df8e3632fb 100644 --- a/src/qml/jsruntime/qv4vme_moth.cpp +++ b/src/qml/jsruntime/qv4vme_moth.cpp @@ -662,24 +662,6 @@ QV4::ReturnedValue VME::run(QV4::ExecutionContext *context, const uchar *code STOREVALUE(instr.result, instr.alu(context, VALUEPTR(instr.lhs), VALUEPTR(instr.rhs))); MOTH_END_INSTR(BinopContext) - MOTH_BEGIN_INSTR(AddNumberParams) - double lhs = VALUE(instr.lhs).asDouble(); - double rhs = VALUE(instr.rhs).asDouble(); - VALUEPTR(instr.result)->setDouble(lhs + rhs); - MOTH_END_INSTR(AddNumberParams) - - MOTH_BEGIN_INSTR(MulNumberParams) - double lhs = VALUE(instr.lhs).asDouble(); - double rhs = VALUE(instr.rhs).asDouble(); - VALUEPTR(instr.result)->setDouble(lhs * rhs); - MOTH_END_INSTR(MulNumberParams) - - MOTH_BEGIN_INSTR(SubNumberParams) - double lhs = VALUE(instr.lhs).asDouble(); - double rhs = VALUE(instr.rhs).asDouble(); - VALUEPTR(instr.result)->setDouble(lhs - rhs); - MOTH_END_INSTR(SubNumberParams) - MOTH_BEGIN_INSTR(Ret) context->engine->stackPop(stackSize); // TRACE(Ret, "returning value %s", result.toString(context)->toQString().toUtf8().constData()); |