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>.
|
#include <qv4codegen_p.h>
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 } |
Static Public Member Functions | |
static QQmlRefPointer< QV4::CompiledData::CompilationUnit > | compileModule (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 |
Friends | |
class | ScanFunctions |
struct | ControlFlow |
struct | ControlFlowCatch |
struct | ControlFlowFinally |
Definition at line 63 of file qv4codegen_p.h.
|
protected |
Definition at line 66 of file qv4codegen_p.h.
|
protected |
Definition at line 67 of file qv4codegen_p.h.
Enumerator | |
---|---|
NoError | |
SyntaxError | |
ReferenceError |
Definition at line 703 of file qv4codegen_p.h.
|
protected |
Enumerator | |
---|---|
ex | |
cx | |
nx |
Definition at line 417 of file qv4codegen_p.h.
|
protected |
Enumerator | |
---|---|
UPlus | |
UMinus | |
PreIncrement | |
PreDecrement | |
PostIncrement | |
PostDecrement | |
Not | |
Compl |
Definition at line 505 of file qv4codegen_p.h.
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.
|
inlineprotected |
Definition at line 567 of file qv4codegen_p.h.
References QQmlJS::AST::Node::accept().
Referenced by condition(), initializeAndDestructureBindingElement(), statement(), statement(), visit(), and visit().
|
protected |
Definition at line 385 of file qv4codegen.cpp.
References QV4::Moth::BytecodeGenerator::addCJumpInstruction(), bytecodeGenerator, currentExpr(), and expression().
Referenced by jumpBinop().
Codegen::Reference Codegen::binopHelper | ( | QQmlJS::AST::BinaryExpression * | ast, |
QSOperator::Op | oper, | ||
Reference & | left, | ||
Reference & | right ) |
Definition at line 1571 of file qv4codegen.cpp.
References add(), QSOperator::Add, QV4::Moth::BytecodeGenerator::addInstruction(), QSOperator::As, QSOperator::BitAnd, QSOperator::BitOr, QSOperator::BitXor, bytecodeGenerator, cx, dec, QSOperator::Div, QSOperator::Equal, QSOperator::Exp, exprAccept(), QQmlJS::AST::Node::firstSourceLocation(), QV4::Compiler::Codegen::Reference::fromAccumulator(), QV4::Compiler::Codegen::Reference::fromConst(), QV4::StaticValue::fromReturnedValue(), QSOperator::Ge, QSOperator::Gt, QSOperator::In, QSOperator::InstanceOf, jumpBinop(), QQmlJS::AST::Node::lastSourceLocation(), QSOperator::Le, QQmlJS::AST::BinaryExpression::left, QSOperator::LShift, QSOperator::Lt, QSOperator::Mod, QSOperator::Mul, QSOperator::NotEqual, QQmlJS::AST::BinaryExpression::right, QSOperator::RShift, QV4::Moth::BytecodeGenerator::setLocation(), QSOperator::StrictEqual, QSOperator::StrictNotEqual, sub, QSOperator::Sub, and QSOperator::URShift.
Referenced by visit().
|
inlineprotected |
Definition at line 769 of file qv4codegen_p.h.
Referenced by visit().
|
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().
|
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().
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().
|
inline |
Definition at line 741 of file qv4codegen_p.h.
|
inlineprotected |
Definition at line 773 of file qv4codegen_p.h.
Referenced by addCJump(), defineFunction(), visit(), and visit().
|
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().
|
protected |
Definition at line 710 of file qv4codegen.cpp.
References QV4::Moth::BytecodeGenerator::addInstruction(), QV4::Moth::BytecodeGenerator::addJumpInstruction(), bytecodeGenerator, QV4::Moth::BytecodeGenerator::checkException(), QSet< T >::constBegin(), QSet< T >::constEnd(), done, QV4::Compiler::Codegen::Reference::fromAccumulator(), QV4::Compiler::Codegen::Reference::fromConst(), QV4::Compiler::Codegen::Reference::fromStackSlot(), hasError(), initializeAndDestructureBindingElement(), it, QV4::Moth::BytecodeGenerator::jumpFalse(), QV4::Moth::BytecodeGenerator::Jump::link(), QV4::Compiler::Codegen::Reference::loadInAccumulator(), QV4::Moth::BytecodeGenerator::newLabel(), next, QQmlJS::AST::PatternElementList::next, Q_ASSERT, QQmlJS::AST::PatternElement::RestElement, QV4::Compiler::Codegen::Reference::storeConstOnStack(), and QQmlJS::AST::PatternElement::type.
Referenced by destructurePattern(), and initializeAndDestructureBindingElement().
|
protected |
Definition at line 798 of file qv4codegen.cpp.
References destructureElementList(), destructurePropertyList(), and o.
Referenced by visit(), and visit().
|
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().
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().
|
overrideprotected |
Definition at line 2063 of file qv4codegen.cpp.
References m_seenOptionalChainNodes, and QSet< T >::remove().
|
overrideprotected |
Definition at line 2363 of file qv4codegen.cpp.
References m_seenOptionalChainNodes, and QSet< T >::remove().
|
overrideprotected |
Definition at line 2534 of file qv4codegen.cpp.
References m_seenOptionalChainNodes, and QSet< T >::remove().
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().
|
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().
QQmlJS::DiagnosticMessage Codegen::error | ( | ) | const |
Definition at line 4130 of file qv4codegen.cpp.
References _error.
Referenced by compileModule(), QV4::Script::precompile(), visit(), and visit().
|
inline |
Definition at line 709 of file qv4codegen_p.h.
|
inlineprotected |
Definition at line 771 of file qv4codegen_p.h.
Referenced by binopHelper(), unop(), visit(), visit(), and visit().
|
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().
|
inlineprotected |
Definition at line 768 of file qv4codegen_p.h.
Referenced by unop(), and visit().
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().
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().
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().
|
inline |
Definition at line 742 of file qv4codegen_p.h.
Referenced by QV4::Compiler::Context::emitBlockFooter(), and QV4::Compiler::Context::emitBlockHeader().
void Codegen::handleCall | ( | Reference & | base, |
Arguments | calldata, | ||
int | slotForFunction, | ||
int | slotForThisObject, | ||
bool | optional = false ) |
Definition at line 2068 of file qv4codegen.cpp.
References QV4::Moth::BytecodeGenerator::addInstruction(), base, bytecodeGenerator, QV4::Compiler::Codegen::Reference::fromStackSlot(), QV4::Compiler::Codegen::Reference::isStackSlot(), QV4::Compiler::JSUnitGenerator::LookupForCall, QV4::Compiler::Codegen::Reference::Member, QV4::Compiler::Codegen::Reference::Name, Q_ASSERT, QStringLiteral, registerGetterLookup(), registerGlobalGetterLookup(), registerQmlContextPropertyGetterLookup(), QV4::Moth::BytecodeGenerator::setLocation(), QV4::Compiler::Codegen::Reference::stackSlot(), QV4::Compiler::Codegen::Reference::storeOnStack(), QV4::Compiler::Codegen::Reference::Subscript, QV4::Compiler::Codegen::Reference::SuperProperty, and useFastLookups.
Referenced by handleTaggedTemplate(), and visit().
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().
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().
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().
|
inline |
Definition at line 710 of file qv4codegen_p.h.
References NoError.
Referenced by compileModule(), condition(), defineFunction(), destructureElementList(), destructurePropertyList(), QV4::RuntimeCodegen::generateFromFunctionExpression(), generateFromModule(), generateFromProgram(), QmlIR::JSCodeGen::generateJSCodeForFunctionsAndBindings(), QmlIR::JSCodeGen::generateRuntimeFunctions(), handleTaggedTemplate(), initializeAndDestructureBindingElement(), QV4::Script::precompile(), pushArgs(), pushTemplateArgs(), referenceForPropertyName(), statement(), targetForPatternElement(), QV4::RuntimeCodegen::throwReferenceError(), QV4::RuntimeCodegen::throwSyntaxError(), unop(), 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(), 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().
|
protected |
Definition at line 606 of file qv4codegen.cpp.
References accept(), QV4::Moth::BytecodeGenerator::addInstruction(), base, QQmlJS::AST::PatternElement::Binding, QQmlJS::AST::PatternElement::bindingTarget, bytecodeGenerator, destructureElementList(), destructurePropertyList(), QQmlJS::AST::PatternElement::destructuringPattern(), QQmlJS::AST::PatternElement::elementList(), expression(), hasError(), QQmlJS::AST::PatternElement::initializer, jump(), QV4::Moth::BytecodeGenerator::jumpNotUndefined(), QV4::Compiler::Codegen::Reference::loadInAccumulator(), QQmlJS::AST::PatternElement::propertyList(), Q_ASSERT, QQmlJS::AST::PatternElement::RestElement, targetForPatternElement(), QQmlJS::AST::PatternElement::type, and QQmlJS::AST::PatternElement::typeAnnotation.
Referenced by QV4::Compiler::ControlFlowCatch::~ControlFlowCatch(), defineFunction(), destructureElementList(), destructurePropertyList(), variableDeclaration(), and visit().
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().
|
inline |
Definition at line 501 of file qv4codegen_p.h.
Referenced by QV4::Compiler::ControlFlowBlock::~ControlFlowBlock(), and QV4::Compiler::ControlFlowCatch::~ControlFlowCatch().
|
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().
|
protected |
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().
|
inline |
Definition at line 746 of file qv4codegen_p.h.
Referenced by QV4::Compiler::Context::emitBlockHeader().
|
inlineprotected |
Definition at line 779 of file qv4codegen_p.h.
Referenced by condition().
|
inlineprotected |
Definition at line 786 of file qv4codegen_p.h.
Referenced by statement(), and visit().
|
protected |
Definition at line 458 of file qv4codegen.cpp.
References statementList(), and QQmlJS::AST::Program::statements.
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().
Definition at line 777 of file qv4codegen_p.h.
Definition at line 776 of file qv4codegen_p.h.
Definition at line 775 of file qv4codegen_p.h.
Referenced by Codegen(), condition(), statement(), and visit().
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().
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().
|
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().
|
inline |
Definition at line 524 of file qv4codegen_p.h.
References QV4::Compiler::JSUnitGenerator::registerConstant().
|
inline |
Definition at line 528 of file qv4codegen_p.h.
References QV4::Compiler::JSUnitGenerator::registerGetterLookup().
Referenced by handleCall().
|
inline |
Definition at line 536 of file qv4codegen_p.h.
References QV4::Compiler::JSUnitGenerator::registerGlobalGetterLookup().
Referenced by handleCall().
|
inline |
Definition at line 540 of file qv4codegen_p.h.
References QV4::Compiler::JSUnitGenerator::registerQmlContextPropertyGetterLookup().
Referenced by handleCall().
|
inline |
Definition at line 532 of file qv4codegen_p.h.
References QV4::Compiler::JSUnitGenerator::registerSetterLookup().
|
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().
|
inline |
Definition at line 748 of file qv4codegen_p.h.
Referenced by QV4::Compiler::ControlFlow::unwindTarget().
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().
Definition at line 767 of file qv4codegen_p.h.
Definition at line 754 of file qv4codegen_p.h.
|
inline |
Definition at line 725 of file qv4codegen_p.h.
Referenced by QV4::Script::parse().
|
protected |
Definition at line 405 of file qv4codegen.cpp.
References _volatileMemoryLocations, accept(), bytecodeGenerator, hasError(), QV4::Moth::BytecodeGenerator::incrementStatement(), popResult(), pushExpr(), and qSwap().
|
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().
|
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().
|
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().
|
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().
|
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().
|
protectedvirtual |
Reimplemented in QV4::RuntimeCodegen.
Definition at line 4120 of file qv4codegen.cpp.
References SyntaxError.
Referenced by QV4::Compiler::ScanFunctions::checkName(), QV4::Compiler::ScanFunctions::enterFunction(), referenceForName(), throwSyntaxErrorOnEvalOrArgumentsInStrictMode(), visit(), visit(), QV4::Compiler::ScanFunctions::visit(), visit(), visit(), visit(), QV4::Compiler::ScanFunctions::visit(), QV4::Compiler::ScanFunctions::visit(), visit(), visit(), visit(), QV4::Compiler::ScanFunctions::visit(), visit(), visit(), QV4::Compiler::ScanFunctions::visit(), and visit().
|
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().
|
protected |
Definition at line 267 of file qv4codegen.cpp.
References QV4::Moth::BytecodeGenerator::addInstruction(), QV4::Compiler::Codegen::Reference::asLValue(), bytecodeGenerator, Compl, QV4::Compiler::Codegen::Reference::constant, dec, exprAccept(), exprResult(), QV4::Compiler::Codegen::Reference::fromAccumulator(), QV4::Compiler::Codegen::Reference::fromConst(), QV4::StaticValue::fromReturnedValue(), QV4::Compiler::Codegen::Reference::fromStackSlot(), hasError(), QV4::Compiler::Codegen::Reference::isConstant(), QV4::Compiler::Codegen::Reference::loadInAccumulator(), Not, originalValue, PostDecrement, PostIncrement, PreDecrement, PreIncrement, Q_FALLTHROUGH, requiresReturnValue, QV4::Compiler::Codegen::Reference::storeConsumeAccumulator(), QV4::Compiler::Codegen::Reference::storeRetainAccumulator(), UMinus, and UPlus.
Referenced by visit(), visit(), visit(), visit(), visit(), visit(), visit(), and visit().
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().
|
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().
|
protected |
Definition at line 582 of file qv4codegen.cpp.
References it, and variableDeclaration().
Referenced by visit(), and visit().
|
overrideprotected |
|
overrideprotected |
Definition at line 1262 of file qv4codegen.cpp.
References QV4::Moth::BytecodeGenerator::addInstruction(), base, QQmlJS::AST::ArrayMemberExpression::base, bytecodeGenerator, expression(), QQmlJS::AST::ArrayMemberExpression::expression, QQmlJS::AST::Node::firstSourceLocation(), QV4::Compiler::Codegen::Reference::fromConst(), QV4::Compiler::Codegen::Reference::fromMember(), QV4::Compiler::Codegen::Reference::fromSubscript(), QV4::Compiler::Codegen::Reference::fromSuperProperty(), hasError(), QQmlJS::AST::ArrayMemberExpression::isOptional, QV4::Moth::BytecodeGenerator::jumpTrue(), m_optionalChainsStates, setExprResult(), QV4::Compiler::Codegen::Reference::storeOnStack(), str, and QV4::stringToArrayIndex().
|
overrideprotected |
Definition at line 1104 of file qv4codegen.cpp.
References QV4::Moth::BytecodeGenerator::addInstruction(), QV4::Moth::BytecodeGenerator::addJumpInstruction(), QV4::Moth::BytecodeGenerator::addLoopStart(), arg, args, bytecodeGenerator, QV4::Moth::BytecodeGenerator::checkException(), QV4::Moth::StackSlot::createRegister(), done, QQmlJS::AST::ArrayPattern::elements, QV4::StaticValue::emptyValue(), expression(), QV4::Compiler::Codegen::Reference::fromAccumulator(), QV4::Compiler::Codegen::Reference::fromConst(), QV4::Compiler::Codegen::Reference::fromStackSlot(), QV4::Compiler::Codegen::Reference::fromSubscript(), hasError(), QQmlJS::AST::PatternElement::initializer, it, QV4::Moth::BytecodeGenerator::jump(), QV4::Moth::BytecodeGenerator::Jump::link(), QV4::Compiler::Codegen::Reference::loadInAccumulator(), QV4::Moth::BytecodeGenerator::newLabel(), QV4::Moth::BytecodeGenerator::newRegister(), next, push(), Q_ASSERT, setExprResult(), QQmlJS::AST::PatternElement::SpreadElement, QV4::Compiler::Codegen::Reference::storeConstOnStack(), QV4::Compiler::Codegen::Reference::storeConsumeAccumulator(), QQmlJS::AST::PatternElement::type, and void.
|
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().
|
overrideprotected |
Definition at line 3462 of file qv4codegen.cpp.
References controlFlow, hasError(), statementList(), and QQmlJS::AST::Block::statements.
|
overrideprotected |
Definition at line 3474 of file qv4codegen.cpp.
References arg, QV4::Compiler::ControlFlow::Break, bytecodeGenerator, controlFlow, hasError(), QStringView::isEmpty(), QQmlJS::AST::BreakStatement::label, QQmlJS::AST::BreakStatement::lastSourceLocation(), QStringLiteral, throwSyntaxError(), QStringView::toString(), QV4::Compiler::ControlFlow::unwindTarget(), and QV4::Moth::BytecodeGenerator::unwindToLabel().
|
overrideprotected |
Definition at line 1962 of file qv4codegen.cpp.
References _tailCallsAreAllowed, QV4::Moth::BytecodeGenerator::addInstruction(), QQmlJS::AST::CallExpression::arguments, base, QQmlJS::AST::CallExpression::base, bytecodeGenerator, expression(), QV4::Compiler::Codegen::Reference::fromAccumulator(), QV4::Compiler::Codegen::Reference::fromStackSlot(), handleCall(), hasError(), QV4::Compiler::Codegen::Reference::hasSavedCallBaseSlot, QQmlJS::AST::CallExpression::isOptional, QV4::Compiler::Codegen::Reference::isStackSlot(), QV4::Moth::BytecodeGenerator::jumpTrue(), m_optionalChainsStates, QV4::Compiler::Codegen::Reference::Member, QV4::Compiler::Codegen::Reference::Name, QV4::Moth::BytecodeGenerator::newRegister(), pushArgs(), QV4::Compiler::Codegen::Reference::savedCallBaseSlot, QV4::Compiler::Codegen::Reference::savedCallPropertyNameIndex, QV4::Compiler::Codegen::Reference::stackSlot(), QV4::Compiler::Codegen::Reference::storeOnStack(), QV4::Compiler::Codegen::Reference::Subscript, QV4::Compiler::Codegen::Reference::Super, and QV4::Compiler::Codegen::Reference::SuperProperty.
|
overrideprotected |
Definition at line 815 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 820 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 825 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 830 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 1082 of file qv4codegen.cpp.
References QQmlJS::AST::ClassExpression::name, referenceForName(), QStringView::toString(), visit(), and void.
|
overrideprotected |
Definition at line 976 of file qv4codegen.cpp.
References _module, QV4::Moth::BytecodeGenerator::addInstruction(), QQmlJS::AST::FunctionExpression::asFunctionDefinition(), bytecodeGenerator, QV4::Compiler::Module::classes, controlFlow, defineFunction(), QQmlJS::AST::ClassExpression::elements, QV4::StaticValue::emptyValue(), expression(), QQmlJS::AST::Node::firstSourceLocation(), QQmlJS::AST::ClassExpression::firstSourceLocation(), QV4::Compiler::Codegen::Reference::fromAccumulator(), QV4::Compiler::Codegen::Reference::fromConst(), QV4::Compiler::Codegen::Reference::fromStackSlot(), QV4::Compiler::Class::Method::Getter, hasError(), QQmlJS::AST::ClassExpression::heritage, QStringView::isEmpty(), QQmlJS::AST::ClassExpression::name, QV4::Compiler::Class::nameIndex, QV4::Moth::BytecodeGenerator::newRegisterArray(), Q_ASSERT, QStringLiteral, referenceForName(), registerString(), QV4::Compiler::Class::Method::Regular, setExprResult(), QV4::Moth::BytecodeGenerator::setLocation(), QV4::Compiler::Class::Method::Setter, QV4::Compiler::Codegen::Reference::stackSlot(), QV4::Compiler::Codegen::Reference::storeConsumeAccumulator(), throwSyntaxError(), QStringView::toString(), and void.
|
overrideprotected |
Definition at line 2231 of file qv4codegen.cpp.
References bytecodeGenerator, expression(), QQmlJS::AST::ConditionalExpression::expression, QV4::Compiler::Codegen::Reference::fromAccumulator(), hasError(), QV4::Moth::BytecodeGenerator::jump(), QQmlJS::AST::ConditionalExpression::ko, QV4::Moth::BytecodeGenerator::Label::link(), QV4::Compiler::Codegen::Reference::loadInAccumulator(), QV4::Moth::BytecodeGenerator::newLabel(), ok, QQmlJS::AST::ConditionalExpression::ok, and setExprResult().
|
overrideprotected |
Definition at line 3499 of file qv4codegen.cpp.
References arg, bytecodeGenerator, QV4::Compiler::ControlFlow::Continue, controlFlow, hasError(), QStringView::isEmpty(), QQmlJS::AST::ContinueStatement::label, QQmlJS::AST::ContinueStatement::lastSourceLocation(), QStringLiteral, throwSyntaxError(), QStringView::toString(), QV4::Compiler::ControlFlow::unwindTarget(), and QV4::Moth::BytecodeGenerator::unwindToLabel().
|
overrideprotected |
Definition at line 3526 of file qv4codegen.cpp.
References Q_UNIMPLEMENTED.
|
overrideprotected |
Definition at line 835 of file qv4codegen.cpp.
|
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.
|
overrideprotected |
Definition at line 3532 of file qv4codegen.cpp.
References QV4::Moth::BytecodeGenerator::addLoopStart(), bytecodeGenerator, QV4::Moth::BytecodeGenerator::checkException(), QQmlJS::AST::DoWhileStatement::expression, hasError(), QV4::Moth::BytecodeGenerator::jump(), QV4::Moth::BytecodeGenerator::Jump::link(), QV4::Moth::BytecodeGenerator::Label::link(), QV4::Moth::BytecodeGenerator::newLabel(), QQmlJS::AST::DoWhileStatement::semicolonToken, setJumpOutLocation(), statement(), and QQmlJS::AST::DoWhileStatement::statement.
|
overrideprotected |
Definition at line 840 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 3572 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 880 of file qv4codegen.cpp.
References _context, QQmlJS::AST::ExportDeclaration::exportDefault, expression(), QQmlJS::AST::Node::expressionCast(), QV4::Compiler::Codegen::Reference::fromScopedLocal(), QV4::Compiler::Context::localNameForDefaultExport, QV4::Compiler::Context::locals, popResult(), pushExpr(), Q_ASSERT, QQmlJS::AST::ExportDeclaration::variableStatementOrDeclaration, and visit().
|
overrideprotected |
Definition at line 1091 of file qv4codegen.cpp.
References accept(), clearExprResultName(), hasError(), QQmlJS::AST::Expression::left, QQmlJS::AST::Expression::right, and statement().
|
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.
|
overrideprotected |
Definition at line 2367 of file qv4codegen.cpp.
References QV4::Compiler::Codegen::Reference::fromConst(), hasError(), and setExprResult().
|
overrideprotected |
Definition at line 2485 of file qv4codegen.cpp.
References _context, QV4::Moth::BytecodeGenerator::addInstruction(), base, QQmlJS::AST::FieldMemberExpression::base, bytecodeGenerator, QV4::Compiler::Context::contextType, QV4::Compiler::Eval, expression(), QV4::Compiler::Codegen::Reference::fromAccumulator(), QV4::Compiler::Codegen::Reference::fromMember(), QV4::Compiler::Codegen::Reference::fromStackSlot(), QV4::Compiler::Codegen::Reference::fromSuperProperty(), hasError(), QV4::Compiler::Context::isArrowFunction, QQmlJS::AST::FieldMemberExpression::isOptional, QQmlJS::AST::FieldMemberExpression::lastSourceLocation(), load(), m_optionalChainsStates, QQmlJS::AST::FieldMemberExpression::name, QV4::CallData::NewTarget, property, Q_ASSERT, QStringLiteral, referenceForName(), registerString(), setExprResult(), and QStringView::toString().
|
overrideprotected |
Definition at line 845 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 3596 of file qv4codegen.cpp.
References QV4::Moth::BytecodeGenerator::addInstruction(), QV4::Moth::BytecodeGenerator::addJumpInstruction(), QV4::Moth::BytecodeGenerator::addLoopStart(), QV4::Compiler::Codegen::Reference::asLValue(), bytecodeGenerator, QV4::Moth::BytecodeGenerator::checkException(), controlFlow, destructurePattern(), done, error(), expression(), QQmlJS::AST::ForEachStatement::expression, QQmlJS::AST::Node::expressionCast(), QQmlJS::AST::ForEachStatement::forToken, QV4::Compiler::Codegen::Reference::fromStackSlot(), hasError(), initializeAndDestructureBindingElement(), QV4::Compiler::Codegen::Reference::isLValue(), QV4::Moth::BytecodeGenerator::jump(), QQmlJS::AST::ForEachStatement::lhs, QV4::Moth::BytecodeGenerator::Jump::link(), QV4::Compiler::Codegen::Reference::loadInAccumulator(), QV4::Moth::BytecodeGenerator::newLabel(), next, QQmlJS::AST::Pattern::patternCast(), QStringLiteral, setJumpOutLocation(), statement(), QQmlJS::AST::ForEachStatement::statement, QV4::Compiler::Codegen::Reference::storeConsumeAccumulator(), throwReferenceError(), QQmlJS::AST::ForEachStatement::type, and void.
|
overrideprotected |
Definition at line 850 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 3695 of file qv4codegen.cpp.
References _context, QV4::Moth::BytecodeGenerator::addInstruction(), QV4::Moth::BytecodeGenerator::addLoopStart(), bytecodeGenerator, QV4::Moth::BytecodeGenerator::checkException(), QQmlJS::AST::ForStatement::condition, controlFlow, QQmlJS::AST::ForStatement::declarations, QQmlJS::AST::ForStatement::expression, QQmlJS::AST::ForStatement::forToken, hasError(), QQmlJS::AST::ForStatement::initialiser, QV4::Moth::BytecodeGenerator::jump(), QV4::Moth::BytecodeGenerator::label(), QV4::Moth::BytecodeGenerator::Jump::link(), QV4::Moth::BytecodeGenerator::Label::link(), QV4::Moth::BytecodeGenerator::newLabel(), QV4::Compiler::Context::requiresExecutionContext, setJumpOutLocation(), statement(), QQmlJS::AST::ForStatement::statement, and variableDeclarationList().
|
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().
|
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().
|
overrideprotected |
Definition at line 2692 of file qv4codegen.cpp.
References QQmlJS::AST::IdentifierExpression::firstSourceLocation(), hasError(), QQmlJS::AST::IdentifierExpression::name, referenceForName(), setExprResult(), and QStringView::toString().
|
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().
|
overrideprotected |
Definition at line 3771 of file qv4codegen.cpp.
References _labelledStatement, QString::arg(), bytecodeGenerator, controlFlow, error(), QQmlJS::AST::LabelledStatement::firstSourceLocation(), hasError(), QV4::Compiler::ControlFlow::label(), QQmlJS::AST::LabelledStatement::label, QV4::Moth::BytecodeGenerator::Label::link(), QV4::Moth::BytecodeGenerator::newLabel(), QV4::Compiler::ControlFlow::parent, QStringLiteral, statement(), QQmlJS::AST::LabelledStatement::statement, throwSyntaxError(), and QStringView::toString().
|
overrideprotected |
Definition at line 2701 of file qv4codegen.cpp.
References accept(), QQmlJS::AST::NestedExpression::expression, and hasError().
|
overrideprotected |
Definition at line 2750 of file qv4codegen.cpp.
References base, expression(), QQmlJS::AST::NewExpression::expression, QQmlJS::AST::Node::firstSourceLocation(), hasError(), QStringLiteral, and throwSyntaxError().
|
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().
|
overrideprotected |
Definition at line 2790 of file qv4codegen.cpp.
References expression(), QQmlJS::AST::NotExpression::expression, hasError(), Not, setExprResult(), and unop().
|
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().
|
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.
|
overrideprotected |
Definition at line 2822 of file qv4codegen.cpp.
References QV4::Moth::BytecodeGenerator::addInstruction(), arg, args, QQmlJS::AST::FunctionExpression::asFunctionDefinition(), bytecodeGenerator, QV4::Moth::StackSlot::createRegister(), defineFunction(), expression(), QV4::Compiler::Codegen::Reference::fromAccumulator(), QV4::Compiler::Codegen::Reference::fromConst(), QV4::Getter, hasError(), it, jsUnitGenerator, members(), QV4::Method, QV4::Moth::BytecodeGenerator::newRegister(), QQmlJS::AST::ObjectPattern::properties, push(), Q_ASSERT, QV4::Compiler::JSUnitGenerator::registerJSClass(), registerString(), setExprResult(), QV4::Setter, QV4::stringToArrayIndex(), QV4::Value, and void.
|
overrideprotected |
Definition at line 860 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 865 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 870 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 875 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 2934 of file qv4codegen.cpp.
References QQmlJS::AST::PostDecrementExpression::base, QQmlJS::AST::PostDecrementExpression::decrementToken, expression(), hasError(), QV4::Compiler::Codegen::Reference::isLValue(), QQmlJS::AST::Node::lastSourceLocation(), PostDecrement, QStringLiteral, setExprResult(), throwReferenceError(), throwSyntaxErrorOnEvalOrArgumentsInStrictMode(), and unop().
|
overrideprotected |
Definition at line 2954 of file qv4codegen.cpp.
References QQmlJS::AST::PostIncrementExpression::base, expression(), hasError(), QQmlJS::AST::PostIncrementExpression::incrementToken, QV4::Compiler::Codegen::Reference::isLValue(), QQmlJS::AST::Node::lastSourceLocation(), PostIncrement, QStringLiteral, setExprResult(), throwReferenceError(), throwSyntaxErrorOnEvalOrArgumentsInStrictMode(), and unop().
|
overrideprotected |
Definition at line 2973 of file qv4codegen.cpp.
References QQmlJS::AST::PreDecrementExpression::decrementToken, expression(), QQmlJS::AST::PreDecrementExpression::expression, hasError(), QV4::Compiler::Codegen::Reference::isLValue(), QQmlJS::AST::Node::lastSourceLocation(), PreDecrement, QStringLiteral, setExprResult(), throwReferenceError(), throwSyntaxErrorOnEvalOrArgumentsInStrictMode(), and unop().
|
overrideprotected |
Definition at line 2991 of file qv4codegen.cpp.
References expression(), QQmlJS::AST::PreIncrementExpression::expression, hasError(), QQmlJS::AST::PreIncrementExpression::incrementToken, QV4::Compiler::Codegen::Reference::isLValue(), QQmlJS::AST::Node::lastSourceLocation(), PreIncrement, QStringLiteral, setExprResult(), throwReferenceError(), throwSyntaxErrorOnEvalOrArgumentsInStrictMode(), and unop().
|
overrideprotected |
Definition at line 855 of file qv4codegen.cpp.
|
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().
|
overrideprotected |
Definition at line 3819 of file qv4codegen.cpp.
References _functionContext, QV4::Compiler::Binding, QV4::Compiler::Context::contextType, emitReturn(), expression(), QQmlJS::AST::ReturnStatement::expression, QV4::Compiler::Codegen::Reference::fromConst(), QV4::Compiler::Function, hasError(), QStringLiteral, QQmlJS::AST::ReturnStatement::returnToken, throwSyntaxError(), and QV4::Encode::undefined().
|
overrideprotected |
Definition at line 916 of file qv4codegen.cpp.
|
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.
|
overrideprotected |
Definition at line 2376 of file qv4codegen.cpp.
References QV4::Compiler::Codegen::Reference::fromSuper(), hasError(), and setExprResult().
|
overrideprotected |
Definition at line 3842 of file qv4codegen.cpp.
References _returnAddress, QQmlJS::AST::SwitchStatement::block, bytecodeGenerator, QQmlJS::AST::CaseBlock::clauses, controlFlow, QQmlJS::AST::CaseBlock::defaultClause, expression(), QQmlJS::AST::SwitchStatement::expression, QQmlJS::AST::CaseClause::expression, QV4::Compiler::Codegen::Reference::fromConst(), hasError(), insideSwitch, it, QV4::Moth::BytecodeGenerator::jump(), QV4::Moth::BytecodeGenerator::jumpStrictEqual(), QV4::Moth::BytecodeGenerator::Jump::link(), QV4::Compiler::Codegen::Reference::loadInAccumulator(), QQmlJS::AST::CaseBlock::moreClauses, QV4::Moth::BytecodeGenerator::newLabel(), requiresReturnValue, QV4::Compiler::Codegen::Reference::stackSlot(), statementList(), QQmlJS::AST::CaseClause::statements, QQmlJS::AST::DefaultClause::statements, QV4::Compiler::Codegen::Reference::storeOnStack(), and QV4::Encode::undefined().
|
overrideprotected |
Definition at line 2539 of file qv4codegen.cpp.
References QQmlJS::AST::TaggedTemplate::base, expression(), handleTaggedTemplate(), and hasError().
|
overrideprotected |
Definition at line 3041 of file qv4codegen.cpp.
References QV4::Moth::BytecodeGenerator::addInstruction(), bytecodeGenerator, expression(), QQmlJS::AST::TemplateLiteral::expression, QV4::Compiler::Codegen::Reference::fromAccumulator(), hasError(), QV4::Compiler::Codegen::Reference::loadInAccumulator(), QV4::Moth::BytecodeGenerator::newRegister(), QQmlJS::AST::TemplateLiteral::next, registerString(), setExprResult(), QV4::Compiler::Codegen::Reference::storeOnStack(), QStringView::toString(), QQmlJS::AST::TemplateLiteral::value, and visit().
|
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().
|
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().
|
overrideprotected |
Definition at line 3108 of file qv4codegen.cpp.
References Compl, expression(), QQmlJS::AST::TildeExpression::expression, hasError(), setExprResult(), and unop().
|
overrideprotected |
Definition at line 3118 of file qv4codegen.cpp.
References QV4::Compiler::Codegen::Reference::fromConst(), hasError(), and setExprResult().
|
overrideprotected |
Definition at line 3974 of file qv4codegen.cpp.
References QQmlJS::AST::TryStatement::finallyExpression, handleTryCatch(), handleTryFinally(), hasError(), and QQmlJS::AST::Finally::statement.
|
overrideprotected |
Definition at line 910 of file qv4codegen.cpp.
References QQmlJS::AST::TypeAnnotation::firstSourceLocation(), and throwSyntaxError().
|
overrideprotected |
Definition at line 3127 of file qv4codegen.cpp.
References QV4::Moth::BytecodeGenerator::addInstruction(), bytecodeGenerator, expression(), QQmlJS::AST::TypeOfExpression::expression, QV4::Compiler::Codegen::Reference::fromAccumulator(), hasError(), QV4::Compiler::Codegen::Reference::loadInAccumulator(), QV4::Compiler::Codegen::Reference::Name, QV4::Compiler::Codegen::Reference::nameAsIndex(), setExprResult(), and QV4::Compiler::Codegen::Reference::type.
|
overrideprotected |
Definition at line 4056 of file qv4codegen.cpp.
References Q_UNIMPLEMENTED.
|
overrideprotected |
Definition at line 921 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 931 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 926 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 4062 of file qv4codegen.cpp.
References Q_UNIMPLEMENTED.
|
overrideprotected |
Definition at line 4068 of file qv4codegen.cpp.
References Q_UNIMPLEMENTED.
|
overrideprotected |
Definition at line 946 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 951 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 956 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 941 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 936 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 961 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 4074 of file qv4codegen.cpp.
References Q_UNIMPLEMENTED.
|
overrideprotected |
Definition at line 966 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 4080 of file qv4codegen.cpp.
References Q_UNIMPLEMENTED.
|
overrideprotected |
Definition at line 4086 of file qv4codegen.cpp.
References Q_UNIMPLEMENTED.
|
overrideprotected |
Definition at line 3154 of file qv4codegen.cpp.
References expression(), QQmlJS::AST::UnaryMinusExpression::expression, hasError(), setExprResult(), UMinus, and unop().
|
overrideprotected |
Definition at line 3164 of file qv4codegen.cpp.
References expression(), QQmlJS::AST::UnaryPlusExpression::expression, hasError(), setExprResult(), unop(), and UPlus.
|
overrideprotected |
Definition at line 971 of file qv4codegen.cpp.
|
overrideprotected |
Definition at line 3990 of file qv4codegen.cpp.
References QQmlJS::AST::VariableStatement::declarations, hasError(), and variableDeclarationList().
|
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().
|
overrideprotected |
Definition at line 3999 of file qv4codegen.cpp.
References QV4::Moth::BytecodeGenerator::addLoopStart(), bytecodeGenerator, QV4::Moth::BytecodeGenerator::checkException(), QQmlJS::AST::WhileStatement::expression, hasError(), QV4::Moth::BytecodeGenerator::jump(), QV4::Moth::BytecodeGenerator::label(), QV4::Moth::BytecodeGenerator::Jump::link(), QV4::Moth::BytecodeGenerator::newLabel(), setJumpOutLocation(), statement(), QQmlJS::AST::WhileStatement::statement, and QQmlJS::AST::WhileStatement::whileToken.
|
overrideprotected |
Definition at line 4031 of file qv4codegen.cpp.
References enterContext(), expression(), QQmlJS::AST::WithStatement::expression, hasError(), leaveContext(), statement(), and QQmlJS::AST::WithStatement::statement.
|
overrideprotected |
Definition at line 3201 of file qv4codegen.cpp.
References _context, QV4::Moth::BytecodeGenerator::addInstruction(), QV4::Moth::BytecodeGenerator::addJumpInstruction(), bytecodeGenerator, QV4::Moth::BytecodeGenerator::checkException(), done, emitReturn(), expression(), QQmlJS::AST::YieldExpression::expression, QQmlJS::AST::YieldExpression::firstSourceLocation(), QV4::Compiler::Codegen::Reference::fromAccumulator(), QV4::Compiler::Codegen::Reference::fromConst(), QV4::Compiler::Codegen::Reference::fromStackSlot(), QV4::Compiler::Function, hasError(), inFormalParameterList, QQmlJS::AST::YieldExpression::isYieldStar, QV4::Moth::BytecodeGenerator::jump(), jump(), QV4::Moth::BytecodeGenerator::jumpNotUndefined(), QV4::Moth::BytecodeGenerator::label(), QV4::Moth::BytecodeGenerator::Jump::link(), load(), QV4::Compiler::Codegen::Reference::loadInAccumulator(), QV4::Moth::BytecodeGenerator::newLabel(), next, QV4::Compiler::Context::parent, Q_ASSERT, resume(), setExprResult(), throwSyntaxError(), and QV4::Encode::undefined().
|
friend |
Definition at line 762 of file qv4codegen_p.h.
|
friend |
Definition at line 763 of file qv4codegen_p.h.
|
friend |
Definition at line 764 of file qv4codegen_p.h.
|
friend |
Definition at line 761 of file qv4codegen_p.h.
|
protected |
Definition at line 796 of file qv4codegen_p.h.
Referenced by defineFunction(), enterBlock(), enterContext(), QV4::RuntimeCodegen::generateFromFunctionExpression(), generateFromModule(), generateFromProgram(), QmlIR::JSCodeGen::generateJSCodeForFunctionsAndBindings(), leaveContext(), referenceForName(), throwSyntaxErrorOnEvalOrArgumentsInStrictMode(), visit(), visit(), visit(), visit(), visit(), and visit().
|
protected |
Definition at line 825 of file qv4codegen_p.h.
Referenced by error().
Definition at line 824 of file qv4codegen_p.h.
|
protected |
Definition at line 823 of file qv4codegen_p.h.
Referenced by QmlIR::JSCodeGen::JSCodeGen(), and url().
Definition at line 797 of file qv4codegen_p.h.
Referenced by defineFunction(), visit(), and visit().
|
protected |
Definition at line 826 of file qv4codegen_p.h.
Referenced by referenceForName().
|
protected |
Definition at line 798 of file qv4codegen_p.h.
Referenced by QV4::Compiler::ControlFlow::loopLabel(), and visit().
|
protected |
Definition at line 794 of file qv4codegen_p.h.
Referenced by QmlIR::JSCodeGen::JSCodeGen(), QV4::Compiler::ScanFunctions::calcEscapingVariables(), createTemplateObject(), defineFunction(), enterContext(), QV4::Compiler::ScanFunctions::enterEnvironment(), QV4::RuntimeCodegen::generateFromFunctionExpression(), generateFromModule(), generateFromProgram(), QV4::RuntimeCodegen::throwReferenceError(), QV4::RuntimeCodegen::throwSyntaxError(), url(), visit(), and visit().
|
protected |
Definition at line 795 of file qv4codegen_p.h.
Referenced by QV4::Compiler::ControlFlowFinally::~ControlFlowFinally(), defineFunction(), emitReturn(), statementList(), visit(), and visit().
|
protected |
Definition at line 801 of file qv4codegen_p.h.
Referenced by defineFunction().
|
protected |
Definition at line 802 of file qv4codegen_p.h.
Referenced by QV4::Compiler::ScanFunctions::enterEnvironment().
|
protected |
Definition at line 808 of file qv4codegen_p.h.
Referenced by visit().
|
protected |
Definition at line 793 of file qv4codegen_p.h.
Referenced by referenceForName(), statement(), and statement().
|
protected |
Definition at line 800 of file qv4codegen_p.h.
Referenced by addCJump(), binopHelper(), condition(), createTemplateObject(), defineFunction(), destructureElementList(), destructurePropertyList(), emitReturn(), QV4::Compiler::Codegen::Reference::fromStackSlot(), QV4::Compiler::ControlFlow::generator(), handleCall(), handleTaggedTemplate(), initializeAndDestructureBindingElement(), jumpBinop(), loadClosure(), pushArgs(), pushTemplateArgs(), statement(), statement(), unop(), 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().
|
protected |
Definition at line 821 of file qv4codegen_p.h.
Referenced by QV4::Compiler::ControlFlow::ControlFlow(), QV4::Compiler::ControlFlow::~ControlFlow(), defineFunction(), emitReturn(), statementList(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), and visit().
|
protected |
Definition at line 807 of file qv4codegen_p.h.
Referenced by defineFunction().
|
protected |
Definition at line 806 of file qv4codegen_p.h.
Referenced by defineFunction(), and visit().
|
protected |
Definition at line 805 of file qv4codegen_p.h.
Referenced by statementList(), and visit().
|
protected |
Definition at line 799 of file qv4codegen_p.h.
Referenced by Codegen(), generateCompilationUnit(), throwSyntaxErrorOnEvalOrArgumentsInStrictMode(), visit(), and visit().
|
protected |
Definition at line 792 of file qv4codegen_p.h.
Definition at line 810 of file qv4codegen_p.h.
Referenced by QmlIR::JSCodeGen::JSCodeGen(), generateFromProgram(), and referenceForName().
|
protected |
|
protected |
Definition at line 818 of file qv4codegen_p.h.
Referenced by endVisit(), endVisit(), and endVisit().
|
protected |
Definition at line 804 of file qv4codegen_p.h.
Referenced by QV4::Compiler::ControlFlowFinally::~ControlFlowFinally(), defineFunction(), statementList(), unop(), visit(), and visit().
|
static |
Definition at line 758 of file qv4codegen_p.h.
Referenced by generateFromProgram(), and getIllegalNames().
|
protected |
Definition at line 809 of file qv4codegen_p.h.
Referenced by defineFunction().
|
protected |
Definition at line 803 of file qv4codegen_p.h.
Referenced by handleCall(), and referenceForName().