aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qqmlirbuilder_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-11-07 10:38:09 +0100
committerJani Heikkinen <jani.heikkinen@qt.io>2018-11-16 12:56:22 +0000
commitae6f850ab50bfe07625df4f810c7bf975c224877 (patch)
tree8cf317a283220b7270135c246489cb4e7667c3c2 /src/qml/compiler/qqmlirbuilder_p.h
parente3948955c961972d34483e7da9c2908f5cb84420 (diff)
Generate lookups into the global object more aggressively
Since change 9333ea8649838d7e0400b0e94c8cbd4fa5d216b0, we lookup properties in the QML context object before the global object to have proper scoping rules for QML. Unfortunately this lead to a performance regression when using global properties such as Math in imported script files, as the lookup would always go through the qml context first. This can be fixed, as we know that the global object is frozen in qml mode, and the standard names of properties in the global object are illegal to use in QML. So simply check for those names in the code generator and create lookups into the global object for those. Change-Id: I4b2089178c9e5f9440abdfd834cf7d92c3c0e2c3 Fixes: QTBUG-71591 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/compiler/qqmlirbuilder_p.h')
-rw-r--r--src/qml/compiler/qqmlirbuilder_p.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/qml/compiler/qqmlirbuilder_p.h b/src/qml/compiler/qqmlirbuilder_p.h
index d1e2b17bb7..3dde929cc4 100644
--- a/src/qml/compiler/qqmlirbuilder_p.h
+++ b/src/qml/compiler/qqmlirbuilder_p.h
@@ -640,7 +640,6 @@ private:
QQmlPropertyCache *_scopeObject;
int _qmlContextSlot;
int _importedScriptsSlot;
- QSet<QString> m_globalNames;
};
struct Q_QML_PRIVATE_EXPORT IRLoader {