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_p.h | |
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_p.h')
-rw-r--r-- | src/qml/compiler/qv4codegen_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4codegen_p.h b/src/qml/compiler/qv4codegen_p.h index 736ac9871d..32f1f1bfd4 100644 --- a/src/qml/compiler/qv4codegen_p.h +++ b/src/qml/compiler/qv4codegen_p.h @@ -330,6 +330,7 @@ protected: V4IR::Expr *identifier(const QString &name, int line = 0, int col = 0); // Hook provided to implement QML lookup semantics virtual V4IR::Expr *fallbackNameLookup(const QString &name, int line, int col); + virtual void beginFunctionBodyHook() {} // nodes virtual bool visit(AST::ArgumentList *ast); |