1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3#ifndef QV4RUNTIMECODEGEN_P_H
4#define QV4RUNTIMECODEGEN_P_H
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is not part of the Qt API. It exists purely as an
11// implementation detail. This header file may change from version to
12// version without notice, or even be removed.
13//
14// We mean it.
15//
16
17#include <private/qv4codegen_p.h>
18
19QT_BEGIN_NAMESPACE
20
21namespace QV4 {
22
23class RuntimeCodegen : public Compiler::Codegen
24{
25public:
26 RuntimeCodegen(ExecutionEngine *engine, Compiler::JSUnitGenerator *jsUnitGenerator, bool strict)
27 : Codegen(jsUnitGenerator, strict)
28 , engine(engine)
29 {}
30
31 void generateFromFunctionExpression(const QString &fileName,
32 const QString &sourceCode,
33 QQmlJS::AST::FunctionExpression *ast,
34 Compiler::Module *module);
35
36 void throwSyntaxError(const QQmlJS::SourceLocation &loc, const QString &detail) override;
37 void throwReferenceError(const QQmlJS::SourceLocation &loc, const QString &detail) override;
38
39private:
40 ExecutionEngine *engine;
41};
42
43}
44
45QT_END_NAMESPACE
46
47#endif // QV4CODEGEN_P_H
48

source code of qtdeclarative/src/qml/jsruntime/qv4runtimecodegen_p.h