aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljslintercodegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmlcompiler/qqmljslintercodegen.cpp')
-rw-r--r--src/qmlcompiler/qqmljslintercodegen.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/qmlcompiler/qqmljslintercodegen.cpp b/src/qmlcompiler/qqmljslintercodegen.cpp
index c7cd5d0d00..175f7ee1e0 100644
--- a/src/qmlcompiler/qqmljslintercodegen.cpp
+++ b/src/qmlcompiler/qqmljslintercodegen.cpp
@@ -16,9 +16,8 @@ QT_BEGIN_NAMESPACE
using namespace Qt::StringLiterals;
QQmlJSLinterCodegen::QQmlJSLinterCodegen(QQmlJSImporter *importer, const QString &fileName,
- const QStringList &qmldirFiles, QQmlJSLogger *logger,
- QQmlJSTypeInfo *typeInfo)
- : QQmlJSAotCompiler(importer, fileName, qmldirFiles, logger), m_typeInfo(typeInfo)
+ const QStringList &qmldirFiles, QQmlJSLogger *logger)
+ : QQmlJSAotCompiler(importer, fileName, qmldirFiles, logger)
{
}
@@ -28,7 +27,6 @@ void QQmlJSLinterCodegen::setDocument(const QmlIR::JSCodeGen *codegen,
Q_UNUSED(codegen);
m_document = document;
m_unitGenerator = &document->jsGenerator;
- m_entireSourceCodeLines = document->code.split(u'\n');
}
std::variant<QQmlJSAotFunction, QQmlJS::DiagnosticMessage>
@@ -84,17 +82,19 @@ bool QQmlJSLinterCodegen::analyzeFunction(const QV4::Compiler::Context *context,
QQmlJSCompilePass::Function *function,
QQmlJS::DiagnosticMessage *error)
{
- QQmlJSTypePropagator propagator(m_unitGenerator, &m_typeResolver, m_logger, m_typeInfo,
- m_passManager);
- QQmlJSCompilePass::InstructionAnnotations annotations = propagator.run(function, error);
+ QQmlJSTypePropagator propagator(m_unitGenerator, &m_typeResolver, m_logger,
+ {}, {}, m_passManager);
+ auto [basicBlocks, annotations] = propagator.run(function, error);
if (!error->isValid()) {
- QQmlJSShadowCheck shadowCheck(m_unitGenerator, &m_typeResolver, m_logger);
- shadowCheck.run(&annotations, function, error);
+ QQmlJSShadowCheck shadowCheck(m_unitGenerator, &m_typeResolver, m_logger, basicBlocks,
+ annotations);
+ shadowCheck.run(function, error);
}
if (!error->isValid()) {
- QQmlJSStorageGeneralizer generalizer(m_unitGenerator, &m_typeResolver, m_logger);
- generalizer.run(annotations, function, error);
+ QQmlJSStorageGeneralizer generalizer(m_unitGenerator, &m_typeResolver, m_logger,
+ basicBlocks, annotations);
+ generalizer.run(function, error);
}
if (error->isValid()) {