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
QV4::Compiler::Codegen Class Reference

#include <qv4codegen_p.h>

+ Inheritance diagram for QV4::Compiler::Codegen:
+ Collaboration diagram for QV4::Compiler::Codegen:

Classes

struct  Arguments
 
struct  ObjectPropertyValue
 
struct  OptionalChainState
 
struct  Reference
 
struct  RegisterScope
 
class  Result
 
class  RValue
 
class  TailCallBlocker
 
class  VolatileMemoryLocations
 
class  VolatileMemoryLocationScanner
 

Public Types

enum  ErrorType { NoError , SyntaxError , ReferenceError }
 

Public Member Functions

 Codegen (QV4::Compiler::JSUnitGenerator *jsUnitGenerator, bool strict, CodegenWarningInterface *iface=defaultCodegenWarningInterface(), bool storeSourceLocations=false)
 
void generateFromProgram (const QString &fileName, const QString &finalUrl, const QString &sourceCode, QQmlJS::AST::Program *ast, Module *module, ContextType contextType=ContextType::Global)
 
void generateFromModule (const QString &fileName, const QString &finalUrl, const QString &sourceCode, QQmlJS::AST::ESModule *ast, Module *module)
 
ContextenterBlock (QQmlJS::AST::Node *node)
 
int leaveBlock ()
 
int registerString (const QString &name)
 
int registerConstant (QV4::ReturnedValue v)
 
int registerGetterLookup (int nameIndex, JSUnitGenerator::LookupMode mode)
 
int registerSetterLookup (int nameIndex)
 
int registerGlobalGetterLookup (int nameIndex, JSUnitGenerator::LookupMode mode)
 
int registerQmlContextPropertyGetterLookup (int nameIndex, JSUnitGenerator::LookupMode mode)
 
virtual int defineFunction (const QString &name, QQmlJS::AST::Node *ast, QQmlJS::AST::FormalParameterList *formals, QQmlJS::AST::StatementList *body)
 
ErrorType errorType () const
 
bool hasError () const
 
QQmlJS::DiagnosticMessage error () const
 
QUrl url () const
 
Reference binopHelper (QQmlJS::AST::BinaryExpression *ast, QSOperator::Op oper, Reference &left, Reference &right)
 
Reference jumpBinop (QSOperator::Op oper, Reference &left, Reference &right)
 
Arguments pushArgs (QQmlJS::AST::ArgumentList *args)
 
void handleCall (Reference &base, Arguments calldata, int slotForFunction, int slotForThisObject, bool optional=false)
 
Arguments pushTemplateArgs (QQmlJS::AST::TemplateLiteral *args)
 
bool handleTaggedTemplate (Reference base, QQmlJS::AST::TaggedTemplate *ast)
 
void createTemplateObject (QQmlJS::AST::TemplateLiteral *t)
 
void setUseFastLookups (bool b)
 
void handleTryCatch (QQmlJS::AST::TryStatement *ast)
 
void handleTryFinally (QQmlJS::AST::TryStatement *ast)
 
Reference referenceForName (const QString &name, bool lhs, const QQmlJS::SourceLocation &accessLocation=QQmlJS::SourceLocation())
 
QQmlRefPointer< QV4::CompiledData::CompilationUnitgenerateCompilationUnit (bool generateUnitData=true)
 
ContextcurrentContext () const
 
BytecodeGeneratorgenerator () const
 
void loadClosure (int index)
 
Modulemodule () const
 
BytecodeGenerator::Label returnLabel ()
 
void setGlobalNames (const QSet< QString > &globalNames)
 

Static Public Member Functions

static QQmlRefPointer< QV4::CompiledData::CompilationUnitcompileModule (bool debugMode, const QString &url, const QString &sourceCode, const QDateTime &sourceTimeStamp, QList< QQmlJS::DiagnosticMessage > *diagnostics)
 

Static Public Attributes

static const char * s_globalNames []
 

Protected Types

enum  Format { ex , cx , nx }
 
enum  UnaryOperation {
  UPlus , UMinus , PreIncrement , PreDecrement ,
  PostIncrement , PostDecrement , Not , Compl
}
 
using BytecodeGenerator = QV4::Moth::BytecodeGenerator
 
using Instruction = QV4::Moth::Instruction
 

Protected Member Functions

void enterContext (QQmlJS::AST::Node *node)
 
int leaveContext ()
 
void leaveLoop ()
 
Reference unop (UnaryOperation op, const Reference &expr)
 
void addCJump ()
 
void statement (QQmlJS::AST::Statement *ast)
 
void statement (QQmlJS::AST::ExpressionNode *ast)
 
void condition (QQmlJS::AST::ExpressionNode *ast, const BytecodeGenerator::Label *iftrue, const BytecodeGenerator::Label *iffalse, bool trueBlockFollowsCondition)
 
Reference expression (QQmlJS::AST::ExpressionNode *ast, const QString &name=QString())
 
void accept (QQmlJS::AST::Node *node)
 
void program (QQmlJS::AST::Program *ast)
 
void statementList (QQmlJS::AST::StatementList *ast)
 
void variableDeclaration (QQmlJS::AST::PatternElement *ast)
 
void variableDeclarationList (QQmlJS::AST::VariableDeclarationList *ast)
 
Reference targetForPatternElement (QQmlJS::AST::PatternElement *p)
 
void initializeAndDestructureBindingElement (QQmlJS::AST::PatternElement *e, const Reference &baseRef=Reference(), bool isDefinition=false)
 
void destructurePropertyList (const Reference &object, QQmlJS::AST::PatternPropertyList *bindingList, bool isDefinition=false)
 
void destructureElementList (const Reference &array, QQmlJS::AST::PatternElementList *bindingList, bool isDefinition=false)
 
void destructurePattern (QQmlJS::AST::Pattern *p, const Reference &rhs)
 
Reference referenceForPropertyName (const Codegen::Reference &object, QQmlJS::AST::PropertyName *name)
 
void emitReturn (const Reference &expr)
 
bool visit (QQmlJS::AST::ArgumentList *ast) override
 
bool visit (QQmlJS::AST::CaseBlock *ast) override
 
bool visit (QQmlJS::AST::CaseClause *ast) override
 
bool visit (QQmlJS::AST::CaseClauses *ast) override
 
bool visit (QQmlJS::AST::Catch *ast) override
 
bool visit (QQmlJS::AST::DefaultClause *ast) override
 
bool visit (QQmlJS::AST::Elision *ast) override
 
bool visit (QQmlJS::AST::Finally *ast) override
 
bool visit (QQmlJS::AST::FormalParameterList *ast) override
 
bool visit (QQmlJS::AST::Program *ast) override
 
bool visit (QQmlJS::AST::StatementList *ast) override
 
bool visit (QQmlJS::AST::UiArrayMemberList *ast) override
 
bool visit (QQmlJS::AST::UiImport *ast) override
 
bool visit (QQmlJS::AST::UiHeaderItemList *ast) override
 
bool visit (QQmlJS::AST::UiPragmaValueList *ast) override
 
bool visit (QQmlJS::AST::UiPragma *ast) override
 
bool visit (QQmlJS::AST::UiObjectInitializer *ast) override
 
bool visit (QQmlJS::AST::UiObjectMemberList *ast) override
 
bool visit (QQmlJS::AST::UiParameterList *ast) override
 
bool visit (QQmlJS::AST::UiProgram *ast) override
 
bool visit (QQmlJS::AST::UiQualifiedId *ast) override
 
bool visit (QQmlJS::AST::VariableDeclarationList *ast) override
 
bool visit (QQmlJS::AST::PatternElement *ast) override
 
bool visit (QQmlJS::AST::PatternElementList *ast) override
 
bool visit (QQmlJS::AST::PatternProperty *ast) override
 
bool visit (QQmlJS::AST::PatternPropertyList *ast) override
 
bool visit (QQmlJS::AST::ExportDeclaration *ast) override
 
bool visit (QQmlJS::AST::TypeAnnotation *ast) override
 
bool visit (QQmlJS::AST::Expression *ast) override
 
bool visit (QQmlJS::AST::ArrayPattern *ast) override
 
bool visit (QQmlJS::AST::ArrayMemberExpression *ast) override
 
bool visit (QQmlJS::AST::BinaryExpression *ast) override
 
bool visit (QQmlJS::AST::CallExpression *ast) override
 
void endVisit (QQmlJS::AST::CallExpression *ast) override
 
bool visit (QQmlJS::AST::ConditionalExpression *ast) override
 
bool visit (QQmlJS::AST::DeleteExpression *ast) override
 
void endVisit (QQmlJS::AST::DeleteExpression *ast) override
 
bool visit (QQmlJS::AST::FalseLiteral *ast) override
 
bool visit (QQmlJS::AST::SuperLiteral *ast) override
 
bool visit (QQmlJS::AST::FieldMemberExpression *ast) override
 
void endVisit (QQmlJS::AST::FieldMemberExpression *ast) override
 
bool visit (QQmlJS::AST::TaggedTemplate *ast) override
 
bool visit (QQmlJS::AST::FunctionExpression *ast) override
 
bool visit (QQmlJS::AST::IdentifierExpression *ast) override
 
bool visit (QQmlJS::AST::NestedExpression *ast) override
 
bool visit (QQmlJS::AST::NewExpression *ast) override
 
bool visit (QQmlJS::AST::NewMemberExpression *ast) override
 
bool visit (QQmlJS::AST::NotExpression *ast) override
 
bool visit (QQmlJS::AST::NullExpression *ast) override
 
bool visit (QQmlJS::AST::NumericLiteral *ast) override
 
bool visit (QQmlJS::AST::ObjectPattern *ast) override
 
bool visit (QQmlJS::AST::PostDecrementExpression *ast) override
 
bool visit (QQmlJS::AST::PostIncrementExpression *ast) override
 
bool visit (QQmlJS::AST::PreDecrementExpression *ast) override
 
bool visit (QQmlJS::AST::PreIncrementExpression *ast) override
 
bool visit (QQmlJS::AST::RegExpLiteral *ast) override
 
bool visit (QQmlJS::AST::StringLiteral *ast) override
 
bool visit (QQmlJS::AST::TemplateLiteral *ast) override
 
bool visit (QQmlJS::AST::ThisExpression *ast) override
 
bool visit (QQmlJS::AST::TildeExpression *ast) override
 
bool visit (QQmlJS::AST::TrueLiteral *ast) override
 
bool visit (QQmlJS::AST::TypeOfExpression *ast) override
 
bool visit (QQmlJS::AST::UnaryMinusExpression *ast) override
 
bool visit (QQmlJS::AST::UnaryPlusExpression *ast) override
 
bool visit (QQmlJS::AST::VoidExpression *ast) override
 
bool visit (QQmlJS::AST::FunctionDeclaration *ast) override
 
bool visit (QQmlJS::AST::YieldExpression *ast) override
 
bool visit (QQmlJS::AST::ClassExpression *ast) override
 
bool visit (QQmlJS::AST::ClassDeclaration *ast) override
 
bool visit (QQmlJS::AST::Block *ast) override
 
bool visit (QQmlJS::AST::BreakStatement *ast) override
 
bool visit (QQmlJS::AST::ContinueStatement *ast) override
 
bool visit (QQmlJS::AST::DebuggerStatement *ast) override
 
bool visit (QQmlJS::AST::DoWhileStatement *ast) override
 
bool visit (QQmlJS::AST::EmptyStatement *ast) override
 
bool visit (QQmlJS::AST::ExpressionStatement *ast) override
 
bool visit (QQmlJS::AST::ForEachStatement *ast) override
 
bool visit (QQmlJS::AST::ForStatement *ast) override
 
bool visit (QQmlJS::AST::IfStatement *ast) override
 
bool visit (QQmlJS::AST::LabelledStatement *ast) override
 
bool visit (QQmlJS::AST::ReturnStatement *ast) override
 
bool visit (QQmlJS::AST::SwitchStatement *ast) override
 
bool visit (QQmlJS::AST::ThrowStatement *ast) override
 
bool visit (QQmlJS::AST::TryStatement *ast) override
 
bool visit (QQmlJS::AST::VariableStatement *ast) override
 
bool visit (QQmlJS::AST::WhileStatement *ast) override
 
bool visit (QQmlJS::AST::WithStatement *ast) override
 
bool visit (QQmlJS::AST::UiArrayBinding *ast) override
 
bool visit (QQmlJS::AST::UiObjectBinding *ast) override
 
bool visit (QQmlJS::AST::UiObjectDefinition *ast) override
 
bool visit (QQmlJS::AST::UiPublicMember *ast) override
 
bool visit (QQmlJS::AST::UiScriptBinding *ast) override
 
bool visit (QQmlJS::AST::UiSourceElement *ast) override
 
bool throwSyntaxErrorOnEvalOrArgumentsInStrictMode (const Reference &r, const QQmlJS::SourceLocation &loc)
 
virtual void throwSyntaxError (const QQmlJS::SourceLocation &loc, const QString &detail)
 
virtual void throwReferenceError (const QQmlJS::SourceLocation &loc, const QString &detail)
 
void throwRecursionDepthError () override
 
void setExprResult (const Reference &result)
 
void setExprResult (Reference &&result)
 
Reference exprResult () const
 
void clearExprResultName ()
 
bool exprAccept (Format f)
 
const ResultcurrentExpr () const
 
void pushExpr (Result &&expr)
 
void pushExpr (const Result &expr)
 
void pushExpr (const QString &name=QString())
 
Result popExpr ()
 
Reference popResult ()
 
- Protected Member Functions inherited from QQmlJS::AST::Visitor
 Visitor (quint16 parentRecursionDepth=0)
 
bool preVisit (Node *) override
 
void postVisit (Node *) override
 
- Protected Member Functions inherited from QQmlJS::AST::BaseVisitor
 BaseVisitor (quint16 parentRecursionDepth=0)
 
virtual ~BaseVisitor ()
 
quint16 recursionDepth () const
 

Protected Attributes

std::vector< Resultm_expressions
 
VolatileMemoryLocations _volatileMemoryLocations
 
Module_module
 
int _returnAddress
 
Context_context
 
Context_functionContext = nullptr
 
QQmlJS::AST::LabelledStatement_labelledStatement
 
QV4::Compiler::JSUnitGeneratorjsUnitGenerator
 
BytecodeGeneratorbytecodeGenerator = nullptr
 
Moth::BytecodeGenerator::Label_returnLabel = nullptr
 
bool _strictMode
 
bool useFastLookups = true
 
bool requiresReturnValue = false
 
bool insideSwitch = false
 
bool inFormalParameterList = false
 
bool functionEndsWithReturn = false
 
bool _tailCallsAreAllowed = true
 
bool storeSourceLocations = false
 
QSet< QStringm_globalNames
 
QSet< QQmlJS::AST::Node * > m_seenOptionalChainNodes
 
std::stack< OptionalChainStatem_optionalChainsStates
 
ControlFlowcontrolFlow = nullptr
 
bool _fileNameIsUrl
 
ErrorType _errorType = NoError
 
QQmlJS::DiagnosticMessage _error
 
CodegenWarningInterface_interface
 
- Protected Attributes inherited from QQmlJS::AST::BaseVisitor
quint16 m_recursionDepth = 0
 

Friends

class ScanFunctions
 
struct ControlFlow
 
struct ControlFlowCatch
 
struct ControlFlowFinally
 

Detailed Description

Definition at line 63 of file qv4codegen_p.h.

Member Typedef Documentation

◆ BytecodeGenerator

◆ Instruction

Definition at line 67 of file qv4codegen_p.h.

Member Enumeration Documentation

◆ ErrorType

Enumerator
NoError 
SyntaxError 
ReferenceError 

Definition at line 703 of file qv4codegen_p.h.

◆ Format

Enumerator
ex 
cx 
nx 

Definition at line 417 of file qv4codegen_p.h.

◆ UnaryOperation

Enumerator
UPlus 
UMinus 
PreIncrement 
PreDecrement 
PostIncrement 
PostDecrement 
Not 
Compl 

Definition at line 505 of file qv4codegen_p.h.

Constructor & Destructor Documentation

◆ Codegen()

Codegen::Codegen ( QV4::Compiler::JSUnitGenerator * jsUnitGenerator,
bool strict,
CodegenWarningInterface * iface = defaultCodegenWarningInterface(),
bool storeSourceLocations = false )

Definition at line 92 of file qv4codegen.cpp.

References QV4::Compiler::JSUnitGenerator::codeGeneratorName, jsUnitGenerator, pushExpr(), and QStringLiteral.

+ Here is the call graph for this function:

Member Function Documentation

◆ accept()

void QV4::Compiler::Codegen::accept ( QQmlJS::AST::Node * node)
inlineprotected

Definition at line 567 of file qv4codegen_p.h.

References QQmlJS::AST::Node::accept().

Referenced by condition(), initializeAndDestructureBindingElement(), statement(), statement(), visit(), and visit().

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

◆ addCJump()

void Codegen::addCJump ( )
protected

Definition at line 385 of file qv4codegen.cpp.

References QV4::Moth::BytecodeGenerator::addCJumpInstruction(), bytecodeGenerator, currentExpr(), and expression().

Referenced by jumpBinop().

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

◆ binopHelper()

◆ clearExprResultName()

void QV4::Compiler::Codegen::clearExprResultName ( )
inlineprotected

Definition at line 769 of file qv4codegen_p.h.

Referenced by visit().

+ Here is the caller graph for this function:

◆ compileModule()

QQmlRefPointer< QV4::CompiledData::CompilationUnit > Codegen::compileModule ( bool debugMode,
const QString & url,
const QString & sourceCode,
const QDateTime & sourceTimeStamp,
QList< QQmlJS::DiagnosticMessage > * diagnostics )
static

Definition at line 4144 of file qv4codegen.cpp.

References error(), generateCompilationUnit(), generateFromModule(), hasError(), QV4::CompiledData::Unit::IsESModule, QQmlJS::Lexer::setCode(), and url().

Referenced by QV4::ExecutionEngine::compileModule(), QQmlScriptBlob::dataReceived(), and qCompileJSFile().

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

◆ condition()

void Codegen::condition ( QQmlJS::AST::ExpressionNode * ast,
const BytecodeGenerator::Label * iftrue,
const BytecodeGenerator::Label * iffalse,
bool trueBlockFollowsCondition )
protected

Definition at line 429 of file qv4codegen.cpp.

References accept(), bytecodeGenerator, ex, QQmlJS::AST::Node::firstSourceLocation(), hasError(), QV4::Moth::BytecodeGenerator::jumpFalse(), QV4::Moth::BytecodeGenerator::jumpTrue(), QV4::Moth::BytecodeGenerator::Jump::link(), popExpr(), pushExpr(), Q_ASSERT, and QV4::Moth::BytecodeGenerator::setLocation().

+ Here is the call graph for this function:

◆ createTemplateObject()

void Codegen::createTemplateObject ( QQmlJS::AST::TemplateLiteral * t)

Definition at line 2588 of file qv4codegen.cpp.

References _module, QV4::Moth::BytecodeGenerator::addInstruction(), bytecodeGenerator, it, registerString(), and QV4::Compiler::Module::templateObjects.

Referenced by handleTaggedTemplate().

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

◆ currentContext()

Context * QV4::Compiler::Codegen::currentContext ( ) const
inline

Definition at line 741 of file qv4codegen_p.h.

◆ currentExpr()

const Result & QV4::Compiler::Codegen::currentExpr ( ) const
inlineprotected

Definition at line 773 of file qv4codegen_p.h.

Referenced by addCJump(), defineFunction(), visit(), and visit().

+ Here is the caller graph for this function:

◆ defineFunction()

int Codegen::defineFunction ( const QString & name,
QQmlJS::AST::Node * ast,
QQmlJS::AST::FormalParameterList * formals,
QQmlJS::AST::StatementList * body )
virtual

Definition at line 3307 of file qv4codegen.cpp.

References _context, _functionContext, _module, _returnAddress, _returnLabel, QV4::Moth::BytecodeGenerator::addInstruction(), arg, QV4::Compiler::Context::arguments, QV4::Compiler::Context::argumentsCanEscape, QQmlJS::AST::PatternElement::bindingIdentifier, QQmlJS::AST::PatternElement::bindingTarget, QV4::Compiler::Context::blockIndex, QV4::Compiler::Module::blocks, bytecodeGenerator, QV4::Compiler::Context::canHaveTailCalls(), QV4::Compiler::Context::code, QV4::Compiler::Context::contextType, controlFlow, QV4::Moth::StackSlot::createRegister(), currentExpr(), QV4::Compiler::Module::debugMode, QV4::Moth::dumpBytecode(), QQmlJS::AST::FormalParameterList::element, QV4::Compiler::Context::emitBlockFooter(), QV4::Compiler::Context::emitBlockHeader(), endsWithReturn(), enterContext(), QV4::Moth::BytecodeGenerator::finalize(), QQmlJS::AST::Node::firstSourceLocation(), QV4::Compiler::Codegen::Reference::fromConst(), functionEndsWithReturn, QV4::Compiler::Context::functionIndex, QV4::Compiler::Module::functions, QV4::Compiler::Global, hasError(), inFormalParameterList, initializeAndDestructureBindingElement(), QQmlJS::AST::PatternElement::initializer, QString::isEmpty(), QV4::Compiler::Context::isGenerator, QV4::Compiler::Context::isStrict, QQmlJS::AST::Node::lastSourceLocation(), leaveContext(), QV4::Compiler::Context::line, QV4::Compiler::Context::lineAndStatementNumberMapping, QV4::Moth::BytecodeGenerator::Label::link(), load(), QV4::Compiler::Context::locals, QV4::Compiler::Codegen::Reference::name, QV4::Compiler::Context::name, QV4::Moth::BytecodeGenerator::newRegister(), QV4::Moth::BytecodeGenerator::newRegisterArray(), QQmlJS::AST::FormalParameterList::next, QV4::Compiler::Context::parent, Q_ASSERT, qDebug, qEnvironmentVariableIsSet(), qSwap(), referenceForName(), QV4::Moth::BytecodeGenerator::registerCount(), QV4::Compiler::Context::registerCountInFunction, QV4::Compiler::Context::requiresExecutionContext, QV4::Compiler::Context::requiresImplicitReturnValue(), requiresReturnValue, QQmlJS::AST::PatternElement::RestElement, QV4::Compiler::Codegen::Result::result(), QV4::Compiler::Context::returnsClosure, QV4::Compiler::ScriptImportedByQML, QV4::Moth::BytecodeGenerator::setLocation(), QList< T >::size(), QQmlJS::AST::StatementList::statement, statementList(), storeSourceLocations, QStringView::toString(), QQmlJS::AST::PatternElement::type, and QV4::Encode::undefined().

Referenced by QV4::Compiler::Context::emitBlockHeader(), QV4::RuntimeCodegen::generateFromFunctionExpression(), generateFromModule(), generateFromProgram(), QmlIR::JSCodeGen::generateJSCodeForFunctionsAndBindings(), visit(), visit(), and visit().

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

◆ destructureElementList()

◆ destructurePattern()

void Codegen::destructurePattern ( QQmlJS::AST::Pattern * p,
const Reference & rhs )
protected

Definition at line 798 of file qv4codegen.cpp.

References destructureElementList(), destructurePropertyList(), and o.

Referenced by visit(), and visit().

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

◆ destructurePropertyList()

void Codegen::destructurePropertyList ( const Reference & object,
QQmlJS::AST::PatternPropertyList * bindingList,
bool isDefinition = false )
protected

Definition at line 690 of file qv4codegen.cpp.

References QV4::Moth::BytecodeGenerator::addInstruction(), bytecodeGenerator, hasError(), initializeAndDestructureBindingElement(), it, property, and referenceForPropertyName().

Referenced by destructurePattern(), and initializeAndDestructureBindingElement().

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

◆ emitReturn()

void Codegen::emitReturn ( const Reference & expr)
protected

Definition at line 3806 of file qv4codegen.cpp.

References _returnAddress, QV4::Moth::BytecodeGenerator::addInstruction(), bytecodeGenerator, controlFlow, QV4::Compiler::Codegen::Reference::loadInAccumulator(), Q_ASSERT, QV4::Compiler::ControlFlow::Return, QV4::Compiler::Codegen::Reference::storeOnStack(), QV4::Compiler::ControlFlow::unwindTarget(), QV4::Moth::BytecodeGenerator::unwindToLabel(), and void.

Referenced by visit(), and visit().

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

◆ endVisit() [1/3]

void Codegen::endVisit ( QQmlJS::AST::CallExpression * ast)
overrideprotected

Definition at line 2063 of file qv4codegen.cpp.

References m_seenOptionalChainNodes, and QSet< T >::remove().

+ Here is the call graph for this function:

◆ endVisit() [2/3]

void Codegen::endVisit ( QQmlJS::AST::DeleteExpression * ast)
overrideprotected

Definition at line 2363 of file qv4codegen.cpp.

References m_seenOptionalChainNodes, and QSet< T >::remove().

+ Here is the call graph for this function:

◆ endVisit() [3/3]

void Codegen::endVisit ( QQmlJS::AST::FieldMemberExpression * ast)
overrideprotected

Definition at line 2534 of file qv4codegen.cpp.

References m_seenOptionalChainNodes, and QSet< T >::remove().

+ Here is the call graph for this function:

◆ enterBlock()

Context * Codegen::enterBlock ( QQmlJS::AST::Node * node)

Definition at line 261 of file qv4codegen.cpp.

References _context, and enterContext().

Referenced by QV4::Compiler::ControlFlowBlock::ControlFlowBlock(), and QV4::Compiler::ControlFlowCatch::~ControlFlowCatch().

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

◆ enterContext()

void Codegen::enterContext ( QQmlJS::AST::Node * node)
protected

Definition at line 247 of file qv4codegen.cpp.

References _context, _module, QV4::Compiler::Module::contextMap, and Q_ASSERT.

Referenced by defineFunction(), enterBlock(), and visit().

+ Here is the caller graph for this function:

◆ error()

QQmlJS::DiagnosticMessage Codegen::error ( ) const

Definition at line 4130 of file qv4codegen.cpp.

References _error.

Referenced by compileModule(), QV4::Script::precompile(), visit(), and visit().

+ Here is the caller graph for this function:

◆ errorType()

ErrorType QV4::Compiler::Codegen::errorType ( ) const
inline

Definition at line 709 of file qv4codegen_p.h.

◆ exprAccept()

bool QV4::Compiler::Codegen::exprAccept ( Format f)
inlineprotected

Definition at line 771 of file qv4codegen_p.h.

Referenced by binopHelper(), unop(), visit(), visit(), and visit().

+ Here is the caller graph for this function:

◆ expression()

Reference QV4::Compiler::Codegen::expression ( QQmlJS::AST::ExpressionNode * ast,
const QString & name = QString() )
inlineprotected

Definition at line 557 of file qv4codegen_p.h.

References QQmlJS::AST::Node::accept().

Referenced by addCJump(), initializeAndDestructureBindingElement(), pushArgs(), pushTemplateArgs(), referenceForPropertyName(), targetForPatternElement(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), and visit().

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

◆ exprResult()

Reference QV4::Compiler::Codegen::exprResult ( ) const
inlineprotected

Definition at line 768 of file qv4codegen_p.h.

Referenced by unop(), and visit().

+ Here is the caller graph for this function:

◆ generateCompilationUnit()

QQmlRefPointer< QV4::CompiledData::CompilationUnit > Codegen::generateCompilationUnit ( bool generateUnitData = true)

Definition at line 4135 of file qv4codegen.cpp.

References QV4::Compiler::JSUnitGenerator::generateUnit(), and jsUnitGenerator.

Referenced by compileModule(), QV4::Script::parse(), QV4::FunctionCtor::parse(), and QV4::Script::precompile().

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

◆ generateFromModule()

void Codegen::generateFromModule ( const QString & fileName,
const QString & finalUrl,
const QString & sourceCode,
QQmlJS::AST::ESModule * ast,
Module * module )

Definition at line 201 of file qv4codegen.cpp.

References _context, _module, QQmlJS::AST::ESModule::body, QV4::Compiler::Module::contextMap, defineFunction(), QV4::Compiler::ESModule, fileName, QV4::Compiler::Module::fileName, QV4::Compiler::Module::finalUrl, hasError(), QV4::Compiler::Module::importEntries, QV4::Compiler::Module::indirectExportEntries, QV4::Compiler::ExportEntry::lessThan(), QV4::Compiler::Module::localExportEntries, QV4::Compiler::Module::moduleRequests, Q_ASSERT, QStringLiteral, and QV4::Compiler::Module::starExportEntries.

Referenced by compileModule().

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

◆ generateFromProgram()

void Codegen::generateFromProgram ( const QString & fileName,
const QString & finalUrl,
const QString & sourceCode,
QQmlJS::AST::Program * ast,
Module * module,
ContextType contextType = ContextType::Global )

Definition at line 164 of file qv4codegen.cpp.

References _context, _module, defineFunction(), fileName, QV4::Compiler::Module::fileName, QV4::Compiler::Module::finalUrl, QString::fromLatin1(), hasError(), m_globalNames, Q_ASSERT, QStringLiteral, s_globalNames, QV4::Compiler::ScriptImportedByQML, and QQmlJS::AST::Program::statements.

Referenced by QV4::Script::parse(), and QV4::Script::precompile().

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

◆ generator()

BytecodeGenerator * QV4::Compiler::Codegen::generator ( ) const
inline

Definition at line 742 of file qv4codegen_p.h.

Referenced by QV4::Compiler::Context::emitBlockFooter(), and QV4::Compiler::Context::emitBlockHeader().

+ Here is the caller graph for this function:

◆ handleCall()

void Codegen::handleCall ( Reference & base,
Arguments calldata,
int slotForFunction,
int slotForThisObject,
bool optional = false )

◆ handleTaggedTemplate()

bool Codegen::handleTaggedTemplate ( Reference base,
QQmlJS::AST::TaggedTemplate * ast )

Definition at line 2548 of file qv4codegen.cpp.

References base, bytecodeGenerator, createTemplateObject(), QV4::Compiler::Codegen::Reference::fromAccumulator(), handleCall(), hasError(), QV4::Compiler::Codegen::Reference::Member, QV4::Compiler::Codegen::Reference::Name, QV4::Moth::BytecodeGenerator::newRegister(), pushTemplateArgs(), Q_ASSERT, Q_UNUSED, setExprResult(), QV4::Compiler::Codegen::Reference::stackSlot(), QV4::Compiler::Codegen::Reference::storeOnStack(), QV4::Compiler::Codegen::Reference::Subscript, QV4::Compiler::Codegen::Reference::SuperProperty, and QQmlJS::AST::TaggedTemplate::templateLiteral.

Referenced by visit().

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

◆ handleTryCatch()

void Codegen::handleTryCatch ( QQmlJS::AST::TryStatement * ast)

Definition at line 3947 of file qv4codegen.cpp.

References QQmlJS::AST::TryStatement::catchExpression, Q_ASSERT, statement(), and QQmlJS::AST::TryStatement::statement.

Referenced by handleTryFinally(), and visit().

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

◆ handleTryFinally()

void Codegen::handleTryFinally ( QQmlJS::AST::TryStatement * ast)

Definition at line 3959 of file qv4codegen.cpp.

References QQmlJS::AST::TryStatement::catchExpression, QQmlJS::AST::TryStatement::finallyExpression, handleTryCatch(), statement(), and QQmlJS::AST::TryStatement::statement.

Referenced by visit().

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

◆ hasError()

◆ initializeAndDestructureBindingElement()

◆ jumpBinop()

Codegen::Reference Codegen::jumpBinop ( QSOperator::Op oper,
Reference & left,
Reference & right )

Definition at line 1842 of file qv4codegen.cpp.

References addCJump(), QV4::Moth::BytecodeGenerator::addInstruction(), bytecodeGenerator, QSOperator::Equal, QV4::StaticValue::fromReturnedValue(), QSOperator::Ge, QSOperator::Gt, QSOperator::Le, QSOperator::Lt, QSOperator::NotEqual, qSwap(), QSOperator::StrictEqual, and QSOperator::StrictNotEqual.

Referenced by binopHelper().

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

◆ leaveBlock()

int QV4::Compiler::Codegen::leaveBlock ( )
inline

Definition at line 501 of file qv4codegen_p.h.

Referenced by QV4::Compiler::ControlFlowBlock::~ControlFlowBlock(), and QV4::Compiler::ControlFlowCatch::~ControlFlowCatch().

+ Here is the caller graph for this function:

◆ leaveContext()

int Codegen::leaveContext ( )
protected

Definition at line 253 of file qv4codegen.cpp.

References _context, QV4::Compiler::Context::functionIndex, QV4::Compiler::Context::parent, and Q_ASSERT.

Referenced by defineFunction(), and visit().

+ Here is the caller graph for this function:

◆ leaveLoop()

void QV4::Compiler::Codegen::leaveLoop ( )
protected

◆ loadClosure()

void Codegen::loadClosure ( int index)

Definition at line 2681 of file qv4codegen.cpp.

References QV4::Moth::BytecodeGenerator::addInstruction(), bytecodeGenerator, QV4::Compiler::Codegen::Reference::fromConst(), load(), and QV4::Encode::undefined().

Referenced by QV4::Compiler::Context::emitBlockHeader(), and visit().

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

◆ module()

Module * QV4::Compiler::Codegen::module ( ) const
inline

Definition at line 746 of file qv4codegen_p.h.

Referenced by QV4::Compiler::Context::emitBlockHeader().

+ Here is the caller graph for this function:

◆ popExpr()

Result QV4::Compiler::Codegen::popExpr ( )
inlineprotected

Definition at line 779 of file qv4codegen_p.h.

Referenced by condition().

+ Here is the caller graph for this function:

◆ popResult()

Reference QV4::Compiler::Codegen::popResult ( )
inlineprotected

Definition at line 786 of file qv4codegen_p.h.

Referenced by statement(), and visit().

+ Here is the caller graph for this function:

◆ program()

void Codegen::program ( QQmlJS::AST::Program * ast)
protected

Definition at line 458 of file qv4codegen.cpp.

References statementList(), and QQmlJS::AST::Program::statements.

+ Here is the call graph for this function:

◆ pushArgs()

Codegen::Arguments Codegen::pushArgs ( QQmlJS::AST::ArgumentList * args)

Definition at line 2164 of file qv4codegen.cpp.

References args, bytecodeGenerator, QV4::StaticValue::emptyValue(), expression(), QV4::Compiler::Codegen::Reference::fromConst(), hasError(), QV4::Compiler::Codegen::Reference::isStackSlot(), it, QV4::Moth::BytecodeGenerator::newRegisterArray(), QV4::Compiler::Codegen::Reference::stackSlot(), QV4::Compiler::Codegen::Reference::storeOnStack(), QV4::Compiler::Codegen::Reference::tdzCheck(), and void.

Referenced by visit().

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

◆ pushExpr() [1/3]

void QV4::Compiler::Codegen::pushExpr ( const QString & name = QString())
inlineprotected

Definition at line 777 of file qv4codegen_p.h.

◆ pushExpr() [2/3]

void QV4::Compiler::Codegen::pushExpr ( const Result & expr)
inlineprotected

Definition at line 776 of file qv4codegen_p.h.

◆ pushExpr() [3/3]

void QV4::Compiler::Codegen::pushExpr ( Result && expr)
inlineprotected

Definition at line 775 of file qv4codegen_p.h.

Referenced by Codegen(), condition(), statement(), and visit().

+ Here is the caller graph for this function:

◆ pushTemplateArgs()

Codegen::Arguments Codegen::pushTemplateArgs ( QQmlJS::AST::TemplateLiteral * args)

Definition at line 2207 of file qv4codegen.cpp.

References args, bytecodeGenerator, expression(), hasError(), it, QV4::Moth::BytecodeGenerator::newRegisterArray(), QV4::Compiler::Codegen::Reference::storeOnStack(), and void.

Referenced by handleTaggedTemplate().

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

◆ referenceForName()

Codegen::Reference Codegen::referenceForName ( const QString & name,
bool lhs,
const QQmlJS::SourceLocation & accessLocation = QQmlJS::SourceLocation() )

Definition at line 2622 of file qv4codegen.cpp.

References _context, _interface, _volatileMemoryLocations, QQmlJS::SourceLocation::begin(), QSet< T >::contains(), QV4::Compiler::Context::ResolvedName::declarationLocation, QV4::Compiler::Codegen::Reference::fromImport(), QV4::Compiler::Codegen::Reference::fromName(), QV4::Compiler::Codegen::Reference::fromScopedLocal(), QV4::Compiler::Codegen::Reference::fromStackSlot(), QV4::Compiler::Context::ResolvedName::Global, QV4::Compiler::Context::ResolvedName::Import, QV4::Compiler::Context::ResolvedName::index, QV4::Compiler::Context::ResolvedName::isArgOrEval, QV4::Compiler::Context::ResolvedName::isConst, QV4::Compiler::Context::ResolvedName::isInjected, QQmlJS::SourceLocation::isValid(), QV4::Compiler::Codegen::VolatileMemoryLocations::isVolatile(), QV4::Compiler::Context::ResolvedName::Local, m_globalNames, Q_ASSERT, qCWarning, QV4::Compiler::Context::ResolvedName::QmlGlobal, QStringLiteral, QV4::Compiler::CodegenWarningInterface::reportVarUsedBeforeDeclaration(), QV4::Compiler::Context::ResolvedName::requiresTDZCheck, QV4::Compiler::Context::resolveName(), QV4::Compiler::Context::ResolvedName::scope, QV4::Compiler::Context::ResolvedName::Stack, throwSyntaxError(), toLocalFile(), QUrl::toString(), QV4::Compiler::Context::ResolvedName::type, url(), and useFastLookups.

Referenced by defineFunction(), QV4::Compiler::Context::emitBlockHeader(), targetForPatternElement(), visit(), visit(), visit(), visit(), visit(), and visit().

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

◆ referenceForPropertyName()

Codegen::Reference Codegen::referenceForPropertyName ( const Codegen::Reference & object,
QQmlJS::AST::PropertyName * name )
protected

Definition at line 673 of file qv4codegen.cpp.

References expression(), QV4::Compiler::Codegen::Reference::fromMember(), QV4::Compiler::Codegen::Reference::fromSubscript(), hasError(), and property.

Referenced by destructurePropertyList().

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

◆ registerConstant()

int QV4::Compiler::Codegen::registerConstant ( QV4::ReturnedValue v)
inline

Definition at line 524 of file qv4codegen_p.h.

References QV4::Compiler::JSUnitGenerator::registerConstant().

+ Here is the call graph for this function:

◆ registerGetterLookup()

int QV4::Compiler::Codegen::registerGetterLookup ( int nameIndex,
JSUnitGenerator::LookupMode mode )
inline

Definition at line 528 of file qv4codegen_p.h.

References QV4::Compiler::JSUnitGenerator::registerGetterLookup().

Referenced by handleCall().

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

◆ registerGlobalGetterLookup()

int QV4::Compiler::Codegen::registerGlobalGetterLookup ( int nameIndex,
JSUnitGenerator::LookupMode mode )
inline

Definition at line 536 of file qv4codegen_p.h.

References QV4::Compiler::JSUnitGenerator::registerGlobalGetterLookup().

Referenced by handleCall().

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

◆ registerQmlContextPropertyGetterLookup()

int QV4::Compiler::Codegen::registerQmlContextPropertyGetterLookup ( int nameIndex,
JSUnitGenerator::LookupMode mode )
inline

Definition at line 540 of file qv4codegen_p.h.

References QV4::Compiler::JSUnitGenerator::registerQmlContextPropertyGetterLookup().

Referenced by handleCall().

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

◆ registerSetterLookup()

int QV4::Compiler::Codegen::registerSetterLookup ( int nameIndex)
inline

Definition at line 532 of file qv4codegen_p.h.

References QV4::Compiler::JSUnitGenerator::registerSetterLookup().

+ Here is the call graph for this function:

◆ registerString()

int QV4::Compiler::Codegen::registerString ( const QString & name)
inline

Definition at line 521 of file qv4codegen_p.h.

References QV4::Compiler::JSUnitGenerator::registerString().

Referenced by createTemplateObject(), QV4::Compiler::Context::emitBlockHeader(), visit(), visit(), visit(), visit(), and visit().

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

◆ returnLabel()

BytecodeGenerator::Label QV4::Compiler::Codegen::returnLabel ( )
inline

Definition at line 748 of file qv4codegen_p.h.

Referenced by QV4::Compiler::ControlFlow::unwindTarget().

+ Here is the caller graph for this function:

◆ setExprResult() [1/2]

void QV4::Compiler::Codegen::setExprResult ( const Reference & result)
inlineprotected

Definition at line 766 of file qv4codegen_p.h.

Referenced by handleTaggedTemplate(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), and visit().

+ Here is the caller graph for this function:

◆ setExprResult() [2/2]

void QV4::Compiler::Codegen::setExprResult ( Reference && result)
inlineprotected

Definition at line 767 of file qv4codegen_p.h.

◆ setGlobalNames()

void QV4::Compiler::Codegen::setGlobalNames ( const QSet< QString > & globalNames)
inline

Definition at line 754 of file qv4codegen_p.h.

◆ setUseFastLookups()

void QV4::Compiler::Codegen::setUseFastLookups ( bool b)
inline

Definition at line 725 of file qv4codegen_p.h.

Referenced by QV4::Script::parse().

+ Here is the caller graph for this function:

◆ statement() [1/2]

void Codegen::statement ( QQmlJS::AST::ExpressionNode * ast)
protected

Definition at line 405 of file qv4codegen.cpp.

References _volatileMemoryLocations, accept(), bytecodeGenerator, hasError(), QV4::Moth::BytecodeGenerator::incrementStatement(), popResult(), pushExpr(), and qSwap().

+ Here is the call graph for this function:

◆ statement() [2/2]

void Codegen::statement ( QQmlJS::AST::Statement * ast)
protected

Definition at line 392 of file qv4codegen.cpp.

References _volatileMemoryLocations, accept(), bytecodeGenerator, QQmlJS::AST::Node::firstSourceLocation(), QV4::Moth::BytecodeGenerator::incrementStatement(), qSwap(), and QV4::Moth::BytecodeGenerator::setLocation().

Referenced by QV4::Compiler::ControlFlowFinally::~ControlFlowFinally(), handleTryCatch(), handleTryFinally(), statementList(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), and visit().

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

◆ statementList()

void Codegen::statementList ( QQmlJS::AST::StatementList * ast)
protected

Definition at line 522 of file qv4codegen.cpp.

References _returnAddress, completionStatement(), controlFlow, QV4::Compiler::Codegen::Reference::fromConst(), QV4::Compiler::ControlFlow::hasLoop(), insideSwitch, it, requiresReturnValue, statement(), and QV4::Encode::undefined().

Referenced by QV4::Compiler::ControlFlowCatch::~ControlFlowCatch(), defineFunction(), program(), visit(), and visit().

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

◆ targetForPatternElement()

Codegen::Reference Codegen::targetForPatternElement ( QQmlJS::AST::PatternElement * p)
protected

Definition at line 589 of file qv4codegen.cpp.

References QV4::Compiler::Codegen::Reference::asLValue(), expression(), QV4::Compiler::Codegen::Reference::fromStackSlot(), hasError(), QV4::Compiler::Codegen::Reference::isLValue(), QStringLiteral, referenceForName(), and throwReferenceError().

Referenced by initializeAndDestructureBindingElement(), and variableDeclaration().

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

◆ throwRecursionDepthError()

void QV4::Compiler::Codegen::throwRecursionDepthError ( )
inlineoverrideprotectedvirtual

Implements QQmlJS::AST::BaseVisitor.

Definition at line 696 of file qv4codegen_p.h.

References QStringLiteral.

Referenced by QV4::Compiler::Codegen::VolatileMemoryLocationScanner::throwRecursionDepthError(), and QV4::Compiler::ScanFunctions::throwRecursionDepthError().

+ Here is the caller graph for this function:

◆ throwReferenceError()

void Codegen::throwReferenceError ( const QQmlJS::SourceLocation & loc,
const QString & detail )
protectedvirtual

Reimplemented in QV4::RuntimeCodegen.

Definition at line 4125 of file qv4codegen.cpp.

References ReferenceError.

Referenced by targetForPatternElement(), visit(), visit(), visit(), visit(), visit(), and visit().

+ Here is the caller graph for this function:

◆ throwSyntaxError()

void Codegen::throwSyntaxError ( const QQmlJS::SourceLocation & loc,
const QString & detail )
protectedvirtual

◆ throwSyntaxErrorOnEvalOrArgumentsInStrictMode()

bool Codegen::throwSyntaxErrorOnEvalOrArgumentsInStrictMode ( const Reference & r,
const QQmlJS::SourceLocation & loc )
protected

Definition at line 4092 of file qv4codegen.cpp.

References _context, QV4::Compiler::Context::isStrict, jsUnitGenerator, QV4::Compiler::Codegen::Reference::Name, QStringLiteral, QV4::Compiler::Codegen::Reference::ScopedLocal, str, QV4::Compiler::JSUnitGenerator::stringForIndex(), and throwSyntaxError().

Referenced by visit(), visit(), visit(), visit(), and visit().

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

◆ unop()

◆ url()

QUrl Codegen::url ( ) const

Definition at line 4299 of file qv4codegen.cpp.

References _fileNameIsUrl, _module, QV4::Compiler::Module::fileName, and QUrl::fromLocalFile().

Referenced by compileModule(), QV4::Script::precompile(), and referenceForName().

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

◆ variableDeclaration()

void Codegen::variableDeclaration ( QQmlJS::AST::PatternElement * ast)
protected

Definition at line 566 of file qv4codegen.cpp.

References QV4::Compiler::Codegen::Reference::fromConst(), initializeAndDestructureBindingElement(), QQmlJS::AST::PatternElement::initializer, QQmlJS::AST::PatternElement::isLexicallyScoped(), targetForPatternElement(), and QV4::Encode::undefined().

Referenced by variableDeclarationList().

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

◆ variableDeclarationList()

void Codegen::variableDeclarationList ( QQmlJS::AST::VariableDeclarationList * ast)
protected

Definition at line 582 of file qv4codegen.cpp.

References it, and variableDeclaration().

Referenced by visit(), and visit().

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

◆ visit() [1/90]

bool Codegen::visit ( QQmlJS::AST::ArgumentList * ast)
overrideprotected

Definition at line 810 of file qv4codegen.cpp.

Referenced by visit(), visit(), visit(), and visit().

+ Here is the caller graph for this function:

◆ visit() [2/90]

◆ visit() [3/90]

◆ visit() [4/90]

bool Codegen::visit ( QQmlJS::AST::BinaryExpression * ast)
overrideprotected

Definition at line 1341 of file qv4codegen.cpp.

References QSOperator::Add, QV4::Moth::BytecodeGenerator::addInstruction(), QSOperator::And, QSOperator::As, QSOperator::Assign, baseOp(), binopHelper(), QSOperator::BitAnd, QSOperator::BitOr, QSOperator::BitXor, bytecodeGenerator, QSOperator::Coalesce, currentExpr(), cx, destructurePattern(), QSOperator::Div, QSOperator::Equal, QSOperator::Exp, exprAccept(), expression(), exprResult(), QV4::Compiler::Codegen::Reference::fromAccumulator(), QSOperator::Ge, QSOperator::Gt, hasError(), QV4::Compiler::Codegen::Result::iffalse(), QV4::Compiler::Codegen::Result::iftrue(), QSOperator::In, QSOperator::InplaceAdd, QSOperator::InplaceAnd, QSOperator::InplaceDiv, QSOperator::InplaceExp, QSOperator::InplaceLeftShift, QSOperator::InplaceMod, QSOperator::InplaceMul, QSOperator::InplaceOr, QSOperator::InplaceRightShift, QSOperator::InplaceSub, QSOperator::InplaceURightShift, QSOperator::InplaceXor, QSOperator::InstanceOf, QV4::Moth::BytecodeGenerator::jump(), QV4::Moth::BytecodeGenerator::jumpFalse(), QV4::Moth::BytecodeGenerator::jumpTrue(), QQmlJS::AST::Node::lastSourceLocation(), QSOperator::Le, QQmlJS::AST::BinaryExpression::left, QV4::Moth::BytecodeGenerator::Jump::link(), QV4::Moth::BytecodeGenerator::Label::link(), QV4::Compiler::Codegen::Reference::loadInAccumulator(), QSOperator::LShift, QSOperator::Lt, QSOperator::Mod, QSOperator::Mul, QV4::Moth::BytecodeGenerator::newLabel(), QSOperator::NotEqual, QQmlJS::AST::BinaryExpression::op, QQmlJS::AST::BinaryExpression::operatorToken, QSOperator::Or, QQmlJS::AST::Node::patternCast(), Q_FALLTHROUGH, QStringLiteral, QQmlJS::AST::BinaryExpression::right, QSOperator::RShift, setExprResult(), QV4::Moth::BytecodeGenerator::setLocation(), QV4::Compiler::Codegen::Reference::storeOnStack(), QSOperator::StrictEqual, QSOperator::StrictNotEqual, QSOperator::Sub, throwReferenceError(), throwSyntaxError(), throwSyntaxErrorOnEvalOrArgumentsInStrictMode(), QV4::Compiler::Codegen::Result::trueBlockFollowsCondition(), QSOperator::URShift, and visit().

+ Here is the call graph for this function:

◆ visit() [5/90]

bool Codegen::visit ( QQmlJS::AST::Block * ast)
overrideprotected

Definition at line 3462 of file qv4codegen.cpp.

References controlFlow, hasError(), statementList(), and QQmlJS::AST::Block::statements.

+ Here is the call graph for this function:

◆ visit() [6/90]

bool Codegen::visit ( QQmlJS::AST::BreakStatement * ast)
overrideprotected

◆ visit() [7/90]

◆ visit() [8/90]

bool Codegen::visit ( QQmlJS::AST::CaseBlock * ast)
overrideprotected

Definition at line 815 of file qv4codegen.cpp.

◆ visit() [9/90]

bool Codegen::visit ( QQmlJS::AST::CaseClause * ast)
overrideprotected

Definition at line 820 of file qv4codegen.cpp.

◆ visit() [10/90]

bool Codegen::visit ( QQmlJS::AST::CaseClauses * ast)
overrideprotected

Definition at line 825 of file qv4codegen.cpp.

◆ visit() [11/90]

bool Codegen::visit ( QQmlJS::AST::Catch * ast)
overrideprotected

Definition at line 830 of file qv4codegen.cpp.

◆ visit() [12/90]

bool Codegen::visit ( QQmlJS::AST::ClassDeclaration * ast)
overrideprotected

Definition at line 1082 of file qv4codegen.cpp.

References QQmlJS::AST::ClassExpression::name, referenceForName(), QStringView::toString(), visit(), and void.

+ Here is the call graph for this function:

◆ visit() [13/90]

◆ visit() [14/90]

◆ visit() [15/90]

bool Codegen::visit ( QQmlJS::AST::ContinueStatement * ast)
overrideprotected

◆ visit() [16/90]

bool Codegen::visit ( QQmlJS::AST::DebuggerStatement * ast)
overrideprotected

Definition at line 3526 of file qv4codegen.cpp.

References Q_UNIMPLEMENTED.

◆ visit() [17/90]

bool Codegen::visit ( QQmlJS::AST::DefaultClause * ast)
overrideprotected

Definition at line 835 of file qv4codegen.cpp.

◆ visit() [18/90]

bool Codegen::visit ( QQmlJS::AST::DeleteExpression * ast)
overrideprotected

Definition at line 2266 of file qv4codegen.cpp.

References _context, QV4::Moth::BytecodeGenerator::addInstruction(), QV4::Compiler::Codegen::Reference::asLValue(), bytecodeGenerator, QQmlJS::AST::DeleteExpression::deleteToken, QV4::Compiler::Codegen::Reference::elementBase, QV4::Compiler::Codegen::Reference::elementSubscript, expression(), QQmlJS::AST::DeleteExpression::expression, QV4::Compiler::Codegen::Reference::fromAccumulator(), QV4::Compiler::Codegen::Reference::fromConst(), QV4::Compiler::Codegen::Reference::fromStackSlot(), hasError(), QV4::Compiler::Context::isStrict, QV4::Moth::BytecodeGenerator::jumpTrue(), QV4::Compiler::Codegen::Reference::loadInAccumulator(), m_optionalChainsStates, QV4::Compiler::Codegen::Reference::Member, QV4::Compiler::Codegen::Reference::Name, QV4::Compiler::Codegen::Reference::nameAsIndex(), QV4::Compiler::Codegen::Reference::propertyBase, QV4::Compiler::Codegen::Reference::propertyNameIndex, Q_ASSERT, Q_FALLTHROUGH, QStringLiteral, QV4::Compiler::Codegen::Reference::ScopedLocal, setExprResult(), QV4::Compiler::Codegen::RValue::stackSlot(), QV4::Compiler::Codegen::Reference::StackSlot, QV4::Compiler::Codegen::Reference::stackSlotIsLocalOrArgument, QV4::Compiler::Codegen::Reference::Subscript, QV4::Compiler::Codegen::Reference::SuperProperty, throwSyntaxError(), and QV4::Compiler::Codegen::Reference::type.

+ Here is the call graph for this function:

◆ visit() [19/90]

◆ visit() [20/90]

bool Codegen::visit ( QQmlJS::AST::Elision * ast)
overrideprotected

Definition at line 840 of file qv4codegen.cpp.

◆ visit() [21/90]

bool Codegen::visit ( QQmlJS::AST::EmptyStatement * ast)
overrideprotected

Definition at line 3572 of file qv4codegen.cpp.

◆ visit() [22/90]

bool Codegen::visit ( QQmlJS::AST::ExportDeclaration * ast)
overrideprotected

◆ visit() [23/90]

bool Codegen::visit ( QQmlJS::AST::Expression * ast)
overrideprotected

Definition at line 1091 of file qv4codegen.cpp.

References accept(), clearExprResultName(), hasError(), QQmlJS::AST::Expression::left, QQmlJS::AST::Expression::right, and statement().

+ Here is the call graph for this function:

◆ visit() [24/90]

bool Codegen::visit ( QQmlJS::AST::ExpressionStatement * ast)
overrideprotected

Definition at line 3577 of file qv4codegen.cpp.

References _returnAddress, expression(), QQmlJS::AST::ExpressionStatement::expression, hasError(), requiresReturnValue, statement(), QV4::Compiler::Codegen::Reference::storeOnStack(), and void.

+ Here is the call graph for this function:

◆ visit() [25/90]

bool Codegen::visit ( QQmlJS::AST::FalseLiteral * ast)
overrideprotected

Definition at line 2367 of file qv4codegen.cpp.

References QV4::Compiler::Codegen::Reference::fromConst(), hasError(), and setExprResult().

+ Here is the call graph for this function:

◆ visit() [26/90]

◆ visit() [27/90]

bool Codegen::visit ( QQmlJS::AST::Finally * ast)
overrideprotected

Definition at line 845 of file qv4codegen.cpp.

◆ visit() [28/90]

◆ visit() [29/90]

bool Codegen::visit ( QQmlJS::AST::FormalParameterList * ast)
overrideprotected

Definition at line 850 of file qv4codegen.cpp.

◆ visit() [30/90]

◆ visit() [31/90]

bool Codegen::visit ( QQmlJS::AST::FunctionDeclaration * ast)
overrideprotected

Definition at line 3187 of file qv4codegen.cpp.

References _functionContext, QV4::Compiler::Binding, QV4::Compiler::Context::contextType, exprAccept(), hasError(), QV4::Compiler::Codegen::Reference::loadInAccumulator(), QQmlJS::AST::FunctionExpression::name, referenceForName(), and QStringView::toString().

+ Here is the call graph for this function:

◆ visit() [32/90]

bool Codegen::visit ( QQmlJS::AST::FunctionExpression * ast)
overrideprotected

Definition at line 2605 of file qv4codegen.cpp.

References QQmlJS::AST::FunctionExpression::body, defineFunction(), QQmlJS::AST::FunctionExpression::formals, QV4::Compiler::Codegen::Reference::fromAccumulator(), hasError(), loadClosure(), QQmlJS::AST::FunctionExpression::name, setExprResult(), and QStringView::toString().

+ Here is the call graph for this function:

◆ visit() [33/90]

bool Codegen::visit ( QQmlJS::AST::IdentifierExpression * ast)
overrideprotected

Definition at line 2692 of file qv4codegen.cpp.

References QQmlJS::AST::IdentifierExpression::firstSourceLocation(), hasError(), QQmlJS::AST::IdentifierExpression::name, referenceForName(), setExprResult(), and QStringView::toString().

+ Here is the call graph for this function:

◆ visit() [34/90]

bool Codegen::visit ( QQmlJS::AST::IfStatement * ast)
overrideprotected

Definition at line 3739 of file qv4codegen.cpp.

References _module, bytecodeGenerator, endsWithReturn(), QQmlJS::AST::IfStatement::expression, hasError(), QV4::Moth::BytecodeGenerator::jump(), QQmlJS::AST::IfStatement::ko, QV4::Moth::BytecodeGenerator::Jump::link(), QV4::Moth::BytecodeGenerator::newLabel(), QQmlJS::AST::IfStatement::ok, and statement().

+ Here is the call graph for this function:

◆ visit() [35/90]

◆ visit() [36/90]

bool Codegen::visit ( QQmlJS::AST::NestedExpression * ast)
overrideprotected

Definition at line 2701 of file qv4codegen.cpp.

References accept(), QQmlJS::AST::NestedExpression::expression, and hasError().

+ Here is the call graph for this function:

◆ visit() [37/90]

bool Codegen::visit ( QQmlJS::AST::NewExpression * ast)
overrideprotected

Definition at line 2750 of file qv4codegen.cpp.

References base, expression(), QQmlJS::AST::NewExpression::expression, QQmlJS::AST::Node::firstSourceLocation(), hasError(), QStringLiteral, and throwSyntaxError().

+ Here is the call graph for this function:

◆ visit() [38/90]

bool Codegen::visit ( QQmlJS::AST::NewMemberExpression * ast)
overrideprotected

Definition at line 2770 of file qv4codegen.cpp.

References QQmlJS::AST::NewMemberExpression::arguments, base, QQmlJS::AST::NewMemberExpression::base, expression(), QQmlJS::AST::Node::firstSourceLocation(), hasError(), QStringLiteral, and throwSyntaxError().

+ Here is the call graph for this function:

◆ visit() [39/90]

bool Codegen::visit ( QQmlJS::AST::NotExpression * ast)
overrideprotected

Definition at line 2790 of file qv4codegen.cpp.

References expression(), QQmlJS::AST::NotExpression::expression, hasError(), Not, setExprResult(), and unop().

+ Here is the call graph for this function:

◆ visit() [40/90]

bool Codegen::visit ( QQmlJS::AST::NullExpression * ast)
overrideprotected

Definition at line 2800 of file qv4codegen.cpp.

References bytecodeGenerator, currentExpr(), cx, exprAccept(), QV4::Compiler::Codegen::Reference::fromConst(), hasError(), QV4::Moth::BytecodeGenerator::jump(), QV4::Moth::BytecodeGenerator::Jump::link(), QV4::Encode::null(), and setExprResult().

+ Here is the call graph for this function:

◆ visit() [41/90]

bool Codegen::visit ( QQmlJS::AST::NumericLiteral * ast)
overrideprotected

Definition at line 2813 of file qv4codegen.cpp.

References QV4::Compiler::Codegen::Reference::fromConst(), hasError(), setExprResult(), QV4::Encode::smallestNumber(), and QQmlJS::AST::NumericLiteral::value.

+ Here is the call graph for this function:

◆ visit() [42/90]

◆ visit() [43/90]

bool Codegen::visit ( QQmlJS::AST::PatternElement * ast)
overrideprotected

Definition at line 860 of file qv4codegen.cpp.

◆ visit() [44/90]

bool Codegen::visit ( QQmlJS::AST::PatternElementList * ast)
overrideprotected

Definition at line 865 of file qv4codegen.cpp.

◆ visit() [45/90]

bool Codegen::visit ( QQmlJS::AST::PatternProperty * ast)
overrideprotected

Definition at line 870 of file qv4codegen.cpp.

◆ visit() [46/90]

bool Codegen::visit ( QQmlJS::AST::PatternPropertyList * ast)
overrideprotected

Definition at line 875 of file qv4codegen.cpp.

◆ visit() [47/90]

bool Codegen::visit ( QQmlJS::AST::PostDecrementExpression * ast)
overrideprotected

◆ visit() [48/90]

bool Codegen::visit ( QQmlJS::AST::PostIncrementExpression * ast)
overrideprotected

◆ visit() [49/90]

bool Codegen::visit ( QQmlJS::AST::PreDecrementExpression * ast)
overrideprotected

◆ visit() [50/90]

bool Codegen::visit ( QQmlJS::AST::PreIncrementExpression * ast)
overrideprotected

◆ visit() [51/90]

bool Codegen::visit ( QQmlJS::AST::Program * ast)
overrideprotected

Definition at line 855 of file qv4codegen.cpp.

◆ visit() [52/90]

bool Codegen::visit ( QQmlJS::AST::RegExpLiteral * ast)
overrideprotected

Definition at line 3010 of file qv4codegen.cpp.

References QV4::Moth::BytecodeGenerator::addInstruction(), bytecodeGenerator, QV4::Compiler::Codegen::Reference::fromStackSlot(), hasError(), jsUnitGenerator, QV4::Compiler::JSUnitGenerator::registerRegExp(), and setExprResult().

+ Here is the call graph for this function:

◆ visit() [53/90]

bool Codegen::visit ( QQmlJS::AST::ReturnStatement * ast)
overrideprotected

◆ visit() [54/90]

bool Codegen::visit ( QQmlJS::AST::StatementList * ast)
overrideprotected

Definition at line 916 of file qv4codegen.cpp.

◆ visit() [55/90]

bool Codegen::visit ( QQmlJS::AST::StringLiteral * ast)
overrideprotected

Definition at line 3026 of file qv4codegen.cpp.

References QV4::Moth::BytecodeGenerator::addInstruction(), bytecodeGenerator, QV4::Compiler::Codegen::Reference::fromAccumulator(), hasError(), registerString(), setExprResult(), QStringView::toString(), and QQmlJS::AST::StringLiteral::value.

+ Here is the call graph for this function:

◆ visit() [56/90]

bool Codegen::visit ( QQmlJS::AST::SuperLiteral * ast)
overrideprotected

Definition at line 2376 of file qv4codegen.cpp.

References QV4::Compiler::Codegen::Reference::fromSuper(), hasError(), and setExprResult().

+ Here is the call graph for this function:

◆ visit() [57/90]

◆ visit() [58/90]

bool Codegen::visit ( QQmlJS::AST::TaggedTemplate * ast)
overrideprotected

Definition at line 2539 of file qv4codegen.cpp.

References QQmlJS::AST::TaggedTemplate::base, expression(), handleTaggedTemplate(), and hasError().

+ Here is the call graph for this function:

◆ visit() [59/90]

◆ visit() [60/90]

bool Codegen::visit ( QQmlJS::AST::ThisExpression * ast)
overrideprotected

Definition at line 3088 of file qv4codegen.cpp.

References _context, QV4::Compiler::Block, QV4::Compiler::Codegen::Reference::fromThis(), hasError(), QV4::Compiler::Context::parent, QStringLiteral, referenceForName(), and setExprResult().

+ Here is the call graph for this function:

◆ visit() [61/90]

bool Codegen::visit ( QQmlJS::AST::ThrowStatement * ast)
overrideprotected

Definition at line 3929 of file qv4codegen.cpp.

References QV4::Moth::BytecodeGenerator::addInstruction(), bytecodeGenerator, expression(), QQmlJS::AST::ThrowStatement::expression, hasError(), and QV4::Compiler::Codegen::Reference::loadInAccumulator().

+ Here is the call graph for this function:

◆ visit() [62/90]

bool Codegen::visit ( QQmlJS::AST::TildeExpression * ast)
overrideprotected

Definition at line 3108 of file qv4codegen.cpp.

References Compl, expression(), QQmlJS::AST::TildeExpression::expression, hasError(), setExprResult(), and unop().

+ Here is the call graph for this function:

◆ visit() [63/90]

bool Codegen::visit ( QQmlJS::AST::TrueLiteral * ast)
overrideprotected

Definition at line 3118 of file qv4codegen.cpp.

References QV4::Compiler::Codegen::Reference::fromConst(), hasError(), and setExprResult().

+ Here is the call graph for this function:

◆ visit() [64/90]

bool Codegen::visit ( QQmlJS::AST::TryStatement * ast)
overrideprotected

Definition at line 3974 of file qv4codegen.cpp.

References QQmlJS::AST::TryStatement::finallyExpression, handleTryCatch(), handleTryFinally(), hasError(), and QQmlJS::AST::Finally::statement.

+ Here is the call graph for this function:

◆ visit() [65/90]

bool Codegen::visit ( QQmlJS::AST::TypeAnnotation * ast)
overrideprotected

Definition at line 910 of file qv4codegen.cpp.

References QQmlJS::AST::TypeAnnotation::firstSourceLocation(), and throwSyntaxError().

+ Here is the call graph for this function:

◆ visit() [66/90]

◆ visit() [67/90]

bool Codegen::visit ( QQmlJS::AST::UiArrayBinding * ast)
overrideprotected

Definition at line 4056 of file qv4codegen.cpp.

References Q_UNIMPLEMENTED.

◆ visit() [68/90]

bool Codegen::visit ( QQmlJS::AST::UiArrayMemberList * ast)
overrideprotected

Definition at line 921 of file qv4codegen.cpp.

◆ visit() [69/90]

bool Codegen::visit ( QQmlJS::AST::UiHeaderItemList * ast)
overrideprotected

Definition at line 931 of file qv4codegen.cpp.

◆ visit() [70/90]

bool Codegen::visit ( QQmlJS::AST::UiImport * ast)
overrideprotected

Definition at line 926 of file qv4codegen.cpp.

◆ visit() [71/90]

bool Codegen::visit ( QQmlJS::AST::UiObjectBinding * ast)
overrideprotected

Definition at line 4062 of file qv4codegen.cpp.

References Q_UNIMPLEMENTED.

◆ visit() [72/90]

bool Codegen::visit ( QQmlJS::AST::UiObjectDefinition * ast)
overrideprotected

Definition at line 4068 of file qv4codegen.cpp.

References Q_UNIMPLEMENTED.

◆ visit() [73/90]

bool Codegen::visit ( QQmlJS::AST::UiObjectInitializer * ast)
overrideprotected

Definition at line 946 of file qv4codegen.cpp.

◆ visit() [74/90]

bool Codegen::visit ( QQmlJS::AST::UiObjectMemberList * ast)
overrideprotected

Definition at line 951 of file qv4codegen.cpp.

◆ visit() [75/90]

bool Codegen::visit ( QQmlJS::AST::UiParameterList * ast)
overrideprotected

Definition at line 956 of file qv4codegen.cpp.

◆ visit() [76/90]

bool Codegen::visit ( QQmlJS::AST::UiPragma * ast)
overrideprotected

Definition at line 941 of file qv4codegen.cpp.

◆ visit() [77/90]

bool Codegen::visit ( QQmlJS::AST::UiPragmaValueList * ast)
overrideprotected

Definition at line 936 of file qv4codegen.cpp.

◆ visit() [78/90]

bool Codegen::visit ( QQmlJS::AST::UiProgram * ast)
overrideprotected

Definition at line 961 of file qv4codegen.cpp.

◆ visit() [79/90]

bool Codegen::visit ( QQmlJS::AST::UiPublicMember * ast)
overrideprotected

Definition at line 4074 of file qv4codegen.cpp.

References Q_UNIMPLEMENTED.

◆ visit() [80/90]

bool Codegen::visit ( QQmlJS::AST::UiQualifiedId * ast)
overrideprotected

Definition at line 966 of file qv4codegen.cpp.

◆ visit() [81/90]

bool Codegen::visit ( QQmlJS::AST::UiScriptBinding * ast)
overrideprotected

Definition at line 4080 of file qv4codegen.cpp.

References Q_UNIMPLEMENTED.

◆ visit() [82/90]

bool Codegen::visit ( QQmlJS::AST::UiSourceElement * ast)
overrideprotected

Definition at line 4086 of file qv4codegen.cpp.

References Q_UNIMPLEMENTED.

◆ visit() [83/90]

bool Codegen::visit ( QQmlJS::AST::UnaryMinusExpression * ast)
overrideprotected

Definition at line 3154 of file qv4codegen.cpp.

References expression(), QQmlJS::AST::UnaryMinusExpression::expression, hasError(), setExprResult(), UMinus, and unop().

+ Here is the call graph for this function:

◆ visit() [84/90]

bool Codegen::visit ( QQmlJS::AST::UnaryPlusExpression * ast)
overrideprotected

Definition at line 3164 of file qv4codegen.cpp.

References expression(), QQmlJS::AST::UnaryPlusExpression::expression, hasError(), setExprResult(), unop(), and UPlus.

+ Here is the call graph for this function:

◆ visit() [85/90]

bool Codegen::visit ( QQmlJS::AST::VariableDeclarationList * ast)
overrideprotected

Definition at line 971 of file qv4codegen.cpp.

◆ visit() [86/90]

bool Codegen::visit ( QQmlJS::AST::VariableStatement * ast)
overrideprotected

Definition at line 3990 of file qv4codegen.cpp.

References QQmlJS::AST::VariableStatement::declarations, hasError(), and variableDeclarationList().

+ Here is the call graph for this function:

◆ visit() [87/90]

bool Codegen::visit ( QQmlJS::AST::VoidExpression * ast)
overrideprotected

Definition at line 3174 of file qv4codegen.cpp.

References QQmlJS::AST::VoidExpression::expression, QV4::Compiler::Codegen::Reference::fromConst(), hasError(), setExprResult(), statement(), and QV4::Encode::undefined().

+ Here is the call graph for this function:

◆ visit() [88/90]

◆ visit() [89/90]

bool Codegen::visit ( QQmlJS::AST::WithStatement * ast)
overrideprotected

Definition at line 4031 of file qv4codegen.cpp.

References enterContext(), expression(), QQmlJS::AST::WithStatement::expression, hasError(), leaveContext(), statement(), and QQmlJS::AST::WithStatement::statement.

+ Here is the call graph for this function:

◆ visit() [90/90]

Friends And Related Symbol Documentation

◆ ControlFlow

friend struct ControlFlow
friend

Definition at line 762 of file qv4codegen_p.h.

◆ ControlFlowCatch

friend struct ControlFlowCatch
friend

Definition at line 763 of file qv4codegen_p.h.

◆ ControlFlowFinally

friend struct ControlFlowFinally
friend

Definition at line 764 of file qv4codegen_p.h.

◆ ScanFunctions

friend class ScanFunctions
friend

Definition at line 761 of file qv4codegen_p.h.

Member Data Documentation

◆ _context

◆ _error

QQmlJS::DiagnosticMessage QV4::Compiler::Codegen::_error
protected

Definition at line 825 of file qv4codegen_p.h.

Referenced by error().

◆ _errorType

ErrorType QV4::Compiler::Codegen::_errorType = NoError
protected

Definition at line 824 of file qv4codegen_p.h.

◆ _fileNameIsUrl

bool QV4::Compiler::Codegen::_fileNameIsUrl
protected

Definition at line 823 of file qv4codegen_p.h.

Referenced by QmlIR::JSCodeGen::JSCodeGen(), and url().

◆ _functionContext

Context* QV4::Compiler::Codegen::_functionContext = nullptr
protected

Definition at line 797 of file qv4codegen_p.h.

Referenced by defineFunction(), visit(), and visit().

◆ _interface

CodegenWarningInterface* QV4::Compiler::Codegen::_interface
protected

Definition at line 826 of file qv4codegen_p.h.

Referenced by referenceForName().

◆ _labelledStatement

QQmlJS::AST::LabelledStatement* QV4::Compiler::Codegen::_labelledStatement
protected

Definition at line 798 of file qv4codegen_p.h.

Referenced by QV4::Compiler::ControlFlow::loopLabel(), and visit().

◆ _module

◆ _returnAddress

int QV4::Compiler::Codegen::_returnAddress
protected

◆ _returnLabel

Moth::BytecodeGenerator::Label* QV4::Compiler::Codegen::_returnLabel = nullptr
protected

Definition at line 801 of file qv4codegen_p.h.

Referenced by defineFunction().

◆ _strictMode

bool QV4::Compiler::Codegen::_strictMode
protected

Definition at line 802 of file qv4codegen_p.h.

Referenced by QV4::Compiler::ScanFunctions::enterEnvironment().

◆ _tailCallsAreAllowed

bool QV4::Compiler::Codegen::_tailCallsAreAllowed = true
protected

Definition at line 808 of file qv4codegen_p.h.

Referenced by visit().

◆ _volatileMemoryLocations

VolatileMemoryLocations QV4::Compiler::Codegen::_volatileMemoryLocations
protected

Definition at line 793 of file qv4codegen_p.h.

Referenced by referenceForName(), statement(), and statement().

◆ bytecodeGenerator

◆ controlFlow

◆ functionEndsWithReturn

bool QV4::Compiler::Codegen::functionEndsWithReturn = false
protected

Definition at line 807 of file qv4codegen_p.h.

Referenced by defineFunction().

◆ inFormalParameterList

bool QV4::Compiler::Codegen::inFormalParameterList = false
protected

Definition at line 806 of file qv4codegen_p.h.

Referenced by defineFunction(), and visit().

◆ insideSwitch

bool QV4::Compiler::Codegen::insideSwitch = false
protected

Definition at line 805 of file qv4codegen_p.h.

Referenced by statementList(), and visit().

◆ jsUnitGenerator

QV4::Compiler::JSUnitGenerator* QV4::Compiler::Codegen::jsUnitGenerator
protected

◆ m_expressions

std::vector<Result> QV4::Compiler::Codegen::m_expressions
protected

Definition at line 792 of file qv4codegen_p.h.

◆ m_globalNames

QSet<QString> QV4::Compiler::Codegen::m_globalNames
protected

◆ m_optionalChainsStates

std::stack<OptionalChainState> QV4::Compiler::Codegen::m_optionalChainsStates
protected

Definition at line 819 of file qv4codegen_p.h.

Referenced by visit(), visit(), visit(), and visit().

◆ m_seenOptionalChainNodes

QSet<QQmlJS::AST::Node*> QV4::Compiler::Codegen::m_seenOptionalChainNodes
protected

Definition at line 818 of file qv4codegen_p.h.

Referenced by endVisit(), endVisit(), and endVisit().

◆ requiresReturnValue

bool QV4::Compiler::Codegen::requiresReturnValue = false
protected

◆ s_globalNames

const char * Codegen::s_globalNames
static

Definition at line 758 of file qv4codegen_p.h.

Referenced by generateFromProgram(), and getIllegalNames().

◆ storeSourceLocations

bool QV4::Compiler::Codegen::storeSourceLocations = false
protected

Definition at line 809 of file qv4codegen_p.h.

Referenced by defineFunction().

◆ useFastLookups

bool QV4::Compiler::Codegen::useFastLookups = true
protected

Definition at line 803 of file qv4codegen_p.h.

Referenced by handleCall(), and referenceForName().


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