aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljsstoragegeneralizer.cpp
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2021-11-19 14:17:44 +0100
committerUlf Hermann <[email protected]>2021-11-26 11:58:02 +0100
commit66a7ab6ac1ebde82f6f81d43a5ecb1e693a41fab (patch)
tree50c422b91c5fde57fce3fe01dbc8c2fe04d8e1b2 /src/qmlcompiler/qqmljsstoragegeneralizer.cpp
parent17bfd9c69467f2e7e426674d8d9fc4b9112e852d (diff)
QmlCompiler: Document the compile passes
Task-number: QTBUG-98305 Change-Id: I910d48183c1d78edf6c9d5ca80ceca07d276c702 Reviewed-by: Andrei Golubev <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
Diffstat (limited to 'src/qmlcompiler/qqmljsstoragegeneralizer.cpp')
-rw-r--r--src/qmlcompiler/qqmljsstoragegeneralizer.cpp14
1 files changed, 14 insertions, 0 deletions
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)