Add a flag that allows to construct the Dom with the QQmlJSScopes obtained by semantic analysis. Added a new AST visitor called QQmlDomAstCreatorWithQQmlJSScope. This visitor synchronizes the qqmldomastcreator and the qqmljsimportvisitor to construct the Dom and the QQmlJSScope from the AST at the same time. It mainly does keeping track which subvisitor (dom creator or scope creator) is active, as one subvisitor may visit AST nodes that the other does not. Using both visitors at the same time allows to insert the newly-generated QQmlJSScope::Ptr directly into the correct Dom structure. The actual implementation of QQmlDomAstCreatorWithQQmlJSScope is in its visitT and endVisitT methods. Both are called in the AST-visitor-overloads. Added a benchmark on two big generated qml files to see how fast/slow does the qqmljsccope semantic analysis runs, compared to the QmlDom creation runtime. Task-number: QTBUG-92876 Change-Id: Ia05b6fdd59a637fef9c14b6ab284f4550414f908 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> |
||
---|---|---|
.. | ||
data | ||
CMakeLists.txt | ||
tst_qmlls_utils.cpp | ||
tst_qmlls_utils.h |