![]() |
Qt 6.x
The Qt SDK
|
#include <private/qtqmlcompilerexports_p.h>
#include <QtCore/qstring.h>
#include <QtCore/qlist.h>
#include <QtCore/qloggingcategory.h>
#include <private/qqmlirbuilder_p.h>
#include <private/qqmljscompilepass_p.h>
#include <private/qqmljsdiagnosticmessage_p.h>
#include <private/qqmljsimporter_p.h>
#include <private/qqmljslogger_p.h>
#include <private/qqmljstyperesolver_p.h>
#include <private/qv4compileddata_p.h>
#include <functional>
Go to the source code of this file.
Classes | |
struct | QQmlJSCompileError |
struct | QQmlJSAotFunction |
class | QQmlJSAotCompiler |
Typedefs | |
using | QQmlJSAotFunctionMap = QMap< int, QQmlJSAotFunction > |
using | QQmlJSSaveFunction = std::function< bool(const QV4::CompiledData::SaveableUnitPointer &, const QQmlJSAotFunctionMap &, QString *)> |
using QQmlJSAotFunctionMap = QMap<int, QQmlJSAotFunction> |
Definition at line 98 of file qqmljscompiler_p.h.
using QQmlJSSaveFunction = std::function<bool(const QV4::CompiledData::SaveableUnitPointer &, const QQmlJSAotFunctionMap &, QString *)> |
Definition at line 99 of file qqmljscompiler_p.h.
QT_BEGIN_NAMESPACE Q_QMLCOMPILER_PRIVATE_EXPORT Q_DECLARE_LOGGING_CATEGORY | ( | lcAotCompiler | ) |
bool Q_QMLCOMPILER_PRIVATE_EXPORT qCompileJSFile | ( | const QString & | inputFileName, |
const QString & | inputFileUrl, | ||
QQmlJSSaveFunction | saveFunction, | ||
QQmlJSCompileError * | error | ||
) |
Definition at line 374 of file qqmljscompiler.cpp.
References QString::clear(), QV4::Compiler::Codegen::compileModule(), QV4::CompiledData::CompilationUnit::data, QString::endsWith(), engine, error, QV4::Compiler::Codegen::error(), QV4::Compiler::Module::fileName, QV4::Compiler::Module::finalUrl, QString::fromUtf8(), QRandomGenerator::generate(), QV4::Compiler::Codegen::generateCompilationUnit(), QV4::Compiler::Codegen::generateFromProgram(), generator, QV4::Compiler::Codegen::hasError(), QmlIR::Document::javaScriptCompilationUnit, QmlIR::Document::jsModule, QmlIR::Document::jsParserEngine, QFileDevice::NoError, Q_ASSERT, qScopeGuard(), QStringLiteral, QIODeviceBase::ReadOnly, QV4::Compiler::ScriptImportedByQML, QQmlJS::Lexer::setCode(), QV4::CompiledData::CompilationUnit::unitData(), and url.
bool Q_QMLCOMPILER_PRIVATE_EXPORT qCompileQmlFile | ( | const QString & | inputFileName, |
QQmlJSSaveFunction | saveFunction, | ||
QQmlJSAotCompiler * | aotCompiler, | ||
QQmlJSCompileError * | error, | ||
bool | storeSourceLocation = false , |
||
QV4::Compiler::CodegenWarningInterface * | interface = QV4::Compiler::defaultCodegenWarningInterface() , |
||
const QString * | fileContents = nullptr |
||
) |
Definition at line 180 of file qqmljscompiler.cpp.
References error, interface, and qCompileQmlFile().
Referenced by QQmlJSLinter::lintFile(), and qCompileQmlFile().
bool Q_QMLCOMPILER_PRIVATE_EXPORT qCompileQmlFile | ( | QmlIR::Document & | irDocument, |
const QString & | inputFileName, | ||
QQmlJSSaveFunction | saveFunction, | ||
QQmlJSAotCompiler * | aotCompiler, | ||
QQmlJSCompileError * | error, | ||
bool | storeSourceLocation = false , |
||
QV4::Compiler::CodegenWarningInterface * | interface = QV4::Compiler::defaultCodegenWarningInterface() , |
||
const QString * | fileContents = nullptr |
||
) |
Definition at line 190 of file qqmljscompiler.cpp.
References annotateListElements(), checkArgumentsObjectUseInSignalHandlers(), QHash< Key, T >::constEnd(), QHash< Key, T >::constFind(), QV4::Compiler::Module::contextMap, QV4::CompiledData::CompilationUnit::data, diagnosticErrorMessage(), error, QV4::Compiler::Codegen::error(), QmlIR::IRBuilder::errors, FileScopeCodeIndex, QString::fromUtf8(), function, BindingOrFunction::function(), QRandomGenerator::generate(), QmlIR::IRBuilder::generateFromQml(), QmlIR::JSCodeGen::generateRuntimeFunctions(), generator, QQmlJSAotCompiler::globalCode(), QV4::Compiler::Codegen::hasError(), if(), BindingOrFunction::index(), interface, it, QmlIR::Document::javaScriptCompilationUnit, QV4::Compiler::Codegen::module(), QFileDevice::NoError, QmlIR::Document::objects, QV4::CompiledData::Unit::PendingTypeCompilation, Q_ASSERT, qCDebug, QIODeviceBase::ReadOnly, QQmlJSAotCompiler::setDocument(), QQmlJSAotCompiler::setScope(), and QV4::CompiledData::Unit::StaticData.
bool Q_QMLCOMPILER_PRIVATE_EXPORT qSaveQmlJSUnitAsCpp | ( | const QString & | inputFileName, |
const QString & | outputFileName, | ||
const QV4::CompiledData::SaveableUnitPointer & | unit, | ||
const QQmlJSAotFunctionMap & | aotFunctions, | ||
QString * | errorString | ||
) |
Definition at line 486 of file qqmljscompiler.cpp.
References arg, begin(), QMap< Key, T >::constBegin(), QByteArray::constData(), QMap< Key, T >::constEnd(), FileScopeCodeIndex, QString::fromUtf8(), funcHeaderCode, function, Qt::hex(), QString::isEmpty(), QMap< Key, T >::isEmpty(), it, QByteArrayLiteral, qQmlJSSymbolNamespaceForPath(), QStringLiteral, QV4::CompiledData::SaveableUnitPointer::saveToDisk(), QMap< Key, T >::size(), QString::toUtf8(), QIODeviceBase::Truncate, wrapCallCode, QIODeviceBase::WriteOnly, and writeStr().