aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljscompiler.cpp
diff options
context:
space:
mode:
authorOlivier De Cannière <olivier.decanniere@qt.io>2025-04-15 13:08:55 +0200
committerOlivier De Cannière <olivier.decanniere@qt.io>2025-04-17 12:10:22 +0200
commit96f4e60ffe43d8d387b2ef0002a421edd5d06239 (patch)
tree1104d6a75302e3254db4ee184c26bbb8aec9070a /src/qmlcompiler/qqmljscompiler.cpp
parent4171f5c7388f0f8be168b9aeb78a0bda1586c8f2 (diff)
Compiler: Adapt AotStats to skipping functions
A revision was also added to the aotstats json format. Print a message asking the user to try again with a clean build if a missmatch in revision is found. Task-number: QTBUG-134790 Pick-to: 6.9 6.8 Change-Id: I0961bf841db17f280492ec787f404d9fe9b563f4 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljscompiler.cpp')
-rw-r--r--src/qmlcompiler/qqmljscompiler.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/qmlcompiler/qqmljscompiler.cpp b/src/qmlcompiler/qqmljscompiler.cpp
index 781e9c6e2b..6f7be49dcd 100644
--- a/src/qmlcompiler/qqmljscompiler.cpp
+++ b/src/qmlcompiler/qqmljscompiler.cpp
@@ -809,14 +809,20 @@ QQmlJSAotFunction QQmlJSAotCompiler::doCompileAndRecordAotStats(
auto t2 = std::chrono::high_resolution_clock::now();
if (QQmlJS::QQmlJSAotCompilerStats::recordAotStats()) {
- // TODO: Update AotStats for skipping
QQmlJS::AotStatsEntry entry;
entry.codegenDuration = std::chrono::duration_cast<std::chrono::microseconds>(t2 - t1);
entry.functionName = name;
- entry.errorMessage = m_logger->currentFunctionCompileErrorMessage();
+ entry.message = m_logger->currentFunctionWasSkipped()
+ ? m_logger->currentFunctionCompileSkipMessage()
+ : m_logger->currentFunctionCompileErrorMessage();
entry.line = location.startLine;
entry.column = location.startColumn;
- entry.codegenSuccessful = !m_logger->currentFunctionHasCompileError();
+ if (m_logger->currentFunctionWasSkipped())
+ entry.codegenResult = QQmlJS::CodegenResult::Skip;
+ else if (m_logger->currentFunctionHasCompileError())
+ entry.codegenResult = QQmlJS::CodegenResult::Failure;
+ else
+ entry.codegenResult = QQmlJS::CodegenResult::Success;
QQmlJS::QQmlJSAotCompilerStats::addEntry(
function->qmlScope.containedType()->filePath(), entry);
}