diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-01-15 15:36:25 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-01-17 09:20:59 +0000 |
commit | c2b4c6393fee37e0c6c4a8c5d40d13120cc8a94e (patch) | |
tree | 1e3454e819e248337ad460b0db6a7a7239882523 /src/qml/compiler/qqmltypecompiler.cpp | |
parent | c2d0693ca99171ebeb8f35423f29562b0d26c6c0 (diff) |
Use a more optimized lookup for global properties
Force the use of a global lookup if we know that the
property can and will be found in the global object.
This is possible, as the global object is frozen in QML
mode and can't be overwritten.
Shaves of .5% on the delegates_item_states benchmark, and
will significantly speed up all accesses to e.g. the Math
object.
Change-Id: Ia1e248781a13ebaeb8bc43652e53a6fdde336d0d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qqmltypecompiler.cpp')
-rw-r--r-- | src/qml/compiler/qqmltypecompiler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp index 0dd3cf9bfa..d152d26968 100644 --- a/src/qml/compiler/qqmltypecompiler.cpp +++ b/src/qml/compiler/qqmltypecompiler.cpp @@ -143,7 +143,7 @@ QV4::CompiledData::CompilationUnit *QQmlTypeCompiler::compile() QmlIR::JSCodeGen v4CodeGenerator(typeData->urlString(), typeData->finalUrlString(), document->code, &document->jsModule, &document->jsParserEngine, document->program, - typeNameCache, &document->jsGenerator.stringTable); + typeNameCache, &document->jsGenerator.stringTable, engine->v8engine()->illegalNames()); QQmlJSCodeGenerator jsCodeGen(this, &v4CodeGenerator); if (!jsCodeGen.generateCodeForComponents()) return nullptr; |