diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2023-04-03 10:15:07 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-05-02 19:29:25 +0200 |
commit | 46cc70e2aafc84db6caeaf747629ee6e825b0a4d (patch) | |
tree | 6b599a7754efa2877b15cee918006da5242d5a9f /src/qmlcompiler/qqmljscompiler.cpp | |
parent | 961d11e55f3eb1ac2e33eefd80adede01cc62622 (diff) | |
download | qtdeclarative-46cc70e2aafc84db6caeaf747629ee6e825b0a4d.tar.gz |
QmlCompiler: Relax shadowing check
If we detect a property or method as potentially shadowed, we don't have
to abandon all hope. We can still retrieve it as untyped var. Since
there are a number of things we can do with untyped var, this may still
be useful.
In the same sense, we need to treat function calls as untyped when the
function in question can be shadowed. Calling functions with var
arguments and return types leads to some more interesting situations in
the call frame setup, so we fix that, too.
Task-number: QTBUG-112480
Change-Id: I238d1cf04951f390c73e14ed9e299f2aa72b68cb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljscompiler.cpp')
-rw-r--r-- | src/qmlcompiler/qqmljscompiler.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qmlcompiler/qqmljscompiler.cpp b/src/qmlcompiler/qqmljscompiler.cpp index e946e622c0..63de0358ae 100644 --- a/src/qmlcompiler/qqmljscompiler.cpp +++ b/src/qmlcompiler/qqmljscompiler.cpp @@ -779,13 +779,13 @@ QQmlJSAotFunction QQmlJSAotCompiler::doCompile( if (error->isValid()) return compileError(); - QQmlJSBasicBlocks basicBlocks(m_unitGenerator, &m_typeResolver, m_logger); - typePropagationResult = basicBlocks.run(function, typePropagationResult, error); + QQmlJSShadowCheck shadowCheck(m_unitGenerator, &m_typeResolver, m_logger); + shadowCheck.run(&typePropagationResult, function, error); if (error->isValid()) return compileError(); - QQmlJSShadowCheck shadowCheck(m_unitGenerator, &m_typeResolver, m_logger); - shadowCheck.run(&typePropagationResult, function, error); + QQmlJSBasicBlocks basicBlocks(m_unitGenerator, &m_typeResolver, m_logger); + typePropagationResult = basicBlocks.run(function, typePropagationResult, error); if (error->isValid()) return compileError(); |