Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqmljsstorageinitializer_p.h
Go to the documentation of this file.
1// Copyright (C) 2024 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3// Qt-Security score:significant
4
5#ifndef QQMLJSSTORAGEINITIALIZER_P_H
6#define QQMLJSSTORAGEINITIALIZER_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17
18#include <private/qqmljscompilepass_p.h>
19
21
22class Q_QMLCOMPILER_EXPORT QQmlJSStorageInitializer : public QQmlJSCompilePass
23{
24public:
25 QQmlJSStorageInitializer(const QV4::Compiler::JSUnitGenerator *jsUnitGenerator,
26 const QQmlJSTypeResolver *typeResolver, QQmlJSLogger *logger,
27 const BasicBlocks &basicBlocks,
28 const InstructionAnnotations &annotations)
29 : QQmlJSCompilePass(jsUnitGenerator, typeResolver, logger, basicBlocks, annotations)
30 {}
31
32 BlocksAndAnnotations run(Function *function);
33
34protected:
35 // We don't have to use the byte code here. We only transform the instruction annotations.
36 Verdict startInstruction(QV4::Moth::Instr::Type) override { return SkipInstruction; }
37 void endInstruction(QV4::Moth::Instr::Type) override {}
38};
39
40QT_END_NAMESPACE
41
42#endif // QQMLJSSTORAGEINITIALIZER_P_H