From 66a7ab6ac1ebde82f6f81d43a5ecb1e693a41fab Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 19 Nov 2021 14:17:44 +0100 Subject: QmlCompiler: Document the compile passes Task-number: QTBUG-98305 Change-Id: I910d48183c1d78edf6c9d5ca80ceca07d276c702 Reviewed-by: Andrei Golubev Reviewed-by: Fabian Kosmale --- src/qmlcompiler/qqmljsstoragegeneralizer.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/qmlcompiler/qqmljsstoragegeneralizer.cpp') diff --git a/src/qmlcompiler/qqmljsstoragegeneralizer.cpp b/src/qmlcompiler/qqmljsstoragegeneralizer.cpp index 2b0938c96f..4512d596e1 100644 --- a/src/qmlcompiler/qqmljsstoragegeneralizer.cpp +++ b/src/qmlcompiler/qqmljsstoragegeneralizer.cpp @@ -30,6 +30,20 @@ QT_BEGIN_NAMESPACE +/*! + * \internal + * \class QQmlJSStorageGeneralizer + * + * The QQmlJSStorageGeneralizer is a compile pass that changes all type + * annotations and the function signature to use a generic storage type like + * QVariant or QObject*. This is necessary if we cannot rely on the original + * type to be immediately accessible, for example because we cannot include its + * header. + * + * QQmlJSStorageGeneralizer does not have to use the byte code at all but + * operates only on the annotations and the function description. + */ + QQmlJSCompilePass::InstructionAnnotations QQmlJSStorageGeneralizer::run( InstructionAnnotations annotations, Function *function, QQmlJS::DiagnosticMessage *error) -- cgit v1.2.3