diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-10-18 14:02:56 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-20 21:11:43 +0200 |
commit | 6b2b62e903e1207255b0652b728ecaee6d51aea9 (patch) | |
tree | c832e832680f9d9fe21fc3eda8f7589efd78362a /src/qml/compiler/qv4isel_moth.cpp | |
parent | 9fd4591a61df467362fa2f17cc2d506efd6bece3 (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_moth.cpp')
-rw-r--r-- | src/qml/compiler/qv4isel_moth.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4isel_moth.cpp b/src/qml/compiler/qv4isel_moth.cpp index 0b9473b1d3..c610ca6f02 100644 --- a/src/qml/compiler/qv4isel_moth.cpp +++ b/src/qml/compiler/qv4isel_moth.cpp @@ -449,7 +449,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; Instruction::LoadClosure load; load.value = id; load.result = getResultParam(target); |