diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-10-29 13:02:48 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-25 22:04:42 +0100 |
commit | 71e498adc4d8af11205de2eeefc50ab9eb1ad497 (patch) | |
tree | a5caa4d98520102fe9c8b70e76c62315341291a4 /src/qml/compiler/qv4codegen.cpp | |
parent | cf5185d1872f75b82876dd4e4ecdc3d27240f942 (diff) |
Speed up repeated context, scope and import script lookups
Instead of querying for the context, scope or imported scripts object on each
access, do it once at the beginning of the expression in the IR and re-use the
temp. The optimizer will optimize away unused temps.
Change-Id: I703e737469030c4454d23c567873012a2b537d71
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index 893abc9659..a8338f8656 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -2050,6 +2050,8 @@ int Codegen::defineFunction(const QString &name, AST::Node *ast, ast->firstSourceLocation().startLine, ast->firstSourceLocation().startColumn), 0)); } + beginFunctionBodyHook(); + sourceElements(body); _function->insertBasicBlock(_exitBlock); |