Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QQmlJSAotCompiler Class Reference

#include <qqmljscompiler_p.h>

+ Inheritance diagram for QQmlJSAotCompiler:
+ Collaboration diagram for QQmlJSAotCompiler:

Public Types

enum  Flag { NoFlags = 0x0 , ValidateBasicBlocks = 0x1 }
 

Public Member Functions

 QQmlJSAotCompiler (QQmlJSImporter *importer, const QString &resourcePath, const QStringList &qmldirFiles, QQmlJSLogger *logger)
 
virtual ~QQmlJSAotCompiler ()=default
 
virtual void setDocument (const QmlIR::JSCodeGen *codegen, const QmlIR::Document *document)
 
virtual void setScope (const QmlIR::Object *object, const QmlIR::Object *scope)
 
virtual std::variant< QQmlJSAotFunction, QQmlJS::DiagnosticMessagecompileBinding (const QV4::Compiler::Context *context, const QmlIR::Binding &irBinding, QQmlJS::AST::Node *astNode)
 
virtual std::variant< QQmlJSAotFunction, QQmlJS::DiagnosticMessagecompileFunction (const QV4::Compiler::Context *context, const QString &name, QQmlJS::AST::Node *astNode)
 
virtual QQmlJSAotFunction globalCode () const
 

Public Attributes

Flags m_flags
 

Protected Member Functions

virtual QQmlJS::DiagnosticMessage diagnose (const QString &message, QtMsgType type, const QQmlJS::SourceLocation &location) const
 

Protected Attributes

QQmlJSTypeResolver m_typeResolver
 
const QString m_resourcePath
 
const QStringList m_qmldirFiles
 
const QmlIR::Documentm_document = nullptr
 
const QmlIR::Objectm_currentObject = nullptr
 
const QmlIR::Objectm_currentScope = nullptr
 
const QV4::Compiler::JSUnitGeneratorm_unitGenerator = nullptr
 
QQmlJSImporterm_importer = nullptr
 
QQmlJSLoggerm_logger = nullptr
 

Detailed Description

Definition at line 56 of file qqmljscompiler_p.h.

Member Enumeration Documentation

◆ Flag

Enumerator
NoFlags 
ValidateBasicBlocks 

Definition at line 59 of file qqmljscompiler_p.h.

Constructor & Destructor Documentation

◆ QQmlJSAotCompiler()

QQmlJSAotCompiler::QQmlJSAotCompiler ( QQmlJSImporter * importer,
const QString & resourcePath,
const QStringList & qmldirFiles,
QQmlJSLogger * logger )

Definition at line 608 of file qqmljscompiler.cpp.

◆ ~QQmlJSAotCompiler()

virtual QQmlJSAotCompiler::~QQmlJSAotCompiler ( )
virtualdefault

Member Function Documentation

◆ compileBinding()

std::variant< QQmlJSAotFunction, QQmlJS::DiagnosticMessage > QQmlJSAotCompiler::compileBinding ( const QV4::Compiler::Context * context,
const QmlIR::Binding & irBinding,
QQmlJS::AST::Node * astNode )
virtual

Reimplemented in QQmlJSLinterCodegen.

Definition at line 672 of file qqmljscompiler.cpp.

References context, diagnose(), error, QmlIR::Object::location, m_currentObject, m_currentScope, m_document, m_typeResolver, qCDebug, QtDebugMsg, QtWarningMsg, QQmlJSFunctionInitializer::run(), and QmlIR::Document::stringAt().

+ Here is the call graph for this function:

◆ compileFunction()

std::variant< QQmlJSAotFunction, QQmlJS::DiagnosticMessage > QQmlJSAotCompiler::compileFunction ( const QV4::Compiler::Context * context,
const QString & name,
QQmlJS::AST::Node * astNode )
virtual

Reimplemented in QQmlJSLinterCodegen.

Definition at line 699 of file qqmljscompiler.cpp.

References context, diagnose(), error, QmlIR::Object::location, m_currentObject, m_currentScope, m_typeResolver, qCDebug, QtWarningMsg, and QQmlJSFunctionInitializer::run().

+ Here is the call graph for this function:

◆ diagnose()

QQmlJS::DiagnosticMessage QQmlJSAotCompiler::diagnose ( const QString & message,
QtMsgType type,
const QQmlJS::SourceLocation & location ) const
protectedvirtual

Definition at line 650 of file qqmljscompiler.cpp.

References fileName, QQmlJSLogger::isCategoryFatal(), isStrict(), QQmlJSLogger::log(), m_document, m_logger, m_resourcePath, qFatal, qmlCompiler, qPrintable, QtCriticalMsg, QtFatalMsg, and QtWarningMsg.

Referenced by compileBinding(), QQmlJSLinterCodegen::compileBinding(), compileFunction(), and QQmlJSLinterCodegen::compileFunction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ globalCode()

QQmlJSAotFunction QQmlJSAotCompiler::globalCode ( ) const
virtual

Definition at line 716 of file qqmljscompiler.cpp.

References global.

◆ setDocument()

void QQmlJSAotCompiler::setDocument ( const QmlIR::JSCodeGen * codegen,
const QmlIR::Document * document )
virtual

Reimplemented in QQmlJSLinterCodegen.

Definition at line 619 of file qqmljscompiler.cpp.

References QQmlJSScope::create(), QQmlJSTypeResolver::init(), m_document, m_importer, m_logger, m_qmldirFiles, m_resourcePath, m_typeResolver, m_unitGenerator, Q_UNUSED, QQmlJSLogger::setCode(), and QQmlJSLogger::setFileName().

+ Here is the call graph for this function:

◆ setScope()

void QQmlJSAotCompiler::setScope ( const QmlIR::Object * object,
const QmlIR::Object * scope )
virtual

Definition at line 635 of file qqmljscompiler.cpp.

References m_currentObject, and m_currentScope.

Member Data Documentation

◆ m_currentObject

const QmlIR::Object* QQmlJSAotCompiler::m_currentObject = nullptr
protected

◆ m_currentScope

const QmlIR::Object* QQmlJSAotCompiler::m_currentScope = nullptr
protected

◆ m_document

const QmlIR::Document* QQmlJSAotCompiler::m_document = nullptr
protected

◆ m_flags

Flags QQmlJSAotCompiler::m_flags

Definition at line 80 of file qqmljscompiler_p.h.

◆ m_importer

QQmlJSImporter* QQmlJSAotCompiler::m_importer = nullptr
protected

Definition at line 96 of file qqmljscompiler_p.h.

Referenced by setDocument().

◆ m_logger

QQmlJSLogger* QQmlJSAotCompiler::m_logger = nullptr
protected

Definition at line 97 of file qqmljscompiler_p.h.

Referenced by diagnose(), and setDocument().

◆ m_qmldirFiles

const QStringList QQmlJSAotCompiler::m_qmldirFiles
protected

Definition at line 89 of file qqmljscompiler_p.h.

Referenced by setDocument().

◆ m_resourcePath

const QString QQmlJSAotCompiler::m_resourcePath
protected

Definition at line 88 of file qqmljscompiler_p.h.

Referenced by diagnose(), and setDocument().

◆ m_typeResolver

◆ m_unitGenerator

const QV4::Compiler::JSUnitGenerator* QQmlJSAotCompiler::m_unitGenerator = nullptr
protected

Definition at line 94 of file qqmljscompiler_p.h.

Referenced by setDocument(), and QQmlJSLinterCodegen::setDocument().


The documentation for this class was generated from the following files: