aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4isel_masm.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-10-18 14:02:56 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-20 21:11:43 +0200
commit6b2b62e903e1207255b0652b728ecaee6d51aea9 (patch)
treec832e832680f9d9fe21fc3eda8f7589efd78362a /src/qml/compiler/qv4isel_masm.cpp
parent9fd4591a61df467362fa2f17cc2d506efd6bece3 (diff)
Cleanup: Avoid unnecessary irModule->functions.indexOf calls
With a growing number of functions per module, these calls become expensive and are unnecessary. defineFunction in the code generator can simply return the correct index right away. Change-Id: I8ab56a3083bf215674a1b46c502b415be694e465 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4isel_masm.cpp')
-rw-r--r--src/qml/compiler/qv4isel_masm.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4isel_masm.cpp b/src/qml/compiler/qv4isel_masm.cpp
index 888d11a6c5..d5e67d91c3 100644
--- a/src/qml/compiler/qv4isel_masm.cpp
+++ b/src/qml/compiler/qv4isel_masm.cpp
@@ -1071,7 +1071,7 @@ void InstructionSelection::setActivationProperty(V4IR::Expr *source, const QStri
void InstructionSelection::initClosure(V4IR::Closure *closure, V4IR::Temp *target)
{
- int id = irModule->functions.indexOf(closure->value);
+ int id = closure->value;
generateFunctionCall(target, __qmljs_init_closure, Assembler::ContextRegister, Assembler::TrustedImm32(id));
}