aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4codegen_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-02-13 09:17:10 +0100
committerUlf Hermann <ulf.hermann@qt.io>2019-02-13 10:52:32 +0000
commit01f9c623ed2dc1645ac022d69062f720e3b50132 (patch)
tree9f803a8294c509326909388288c970a3f11313aa /src/qml/compiler/qv4codegen_p.h
parent91a71bce9c633934540e9f06fb081e3b89259ff3 (diff)
Don't optimize global lookups if fast QML lookups are disabled
If fast QML lookups are disabled, we generally want to look up by string. If the name then happens to be a member of the global JavaScript object, we still don't want to directly access that, as the name could have been overridden in a deeper context. Fixes: QTBUG-73750 Change-Id: Id16110969123d91501064ba46bfad4c2a39e4650 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4codegen_p.h')
-rw-r--r--src/qml/compiler/qv4codegen_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4codegen_p.h b/src/qml/compiler/qv4codegen_p.h
index 3f96afc7c2..4d7001fe64 100644
--- a/src/qml/compiler/qv4codegen_p.h
+++ b/src/qml/compiler/qv4codegen_p.h
@@ -561,8 +561,10 @@ protected:
Reference referenceForPropertyName(const Codegen::Reference &object, AST::PropertyName *name);
- // Hook provided to implement QML lookup semantics
+ // Hooks provided to implement QML lookup semantics
+ virtual bool canAccelerateGlobalLookups() const { return true; }
virtual Reference fallbackNameLookup(const QString &name);
+
virtual void beginFunctionBodyHook() {}
void emitReturn(const Reference &expr);