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 <qv4function_p.h>
Classes | |
struct | AOTCompiledFunction |
struct | JSTypedFunction |
Public Types | |
enum | Kind : quint8 { JsUntyped , JsTyped , AotCompiled , Eval } |
typedef ReturnedValue(* | JittedCode) (CppStackFrame *, ExecutionEngine *) |
typedef void(* | AotCompiledCode) (const QQmlPrivate::AOTCompiledContext *context, void **argv) |
Public Member Functions | |
QV4::ExecutableCompilationUnit * | executableCompilationUnit () const |
QV4::Heap::String * | runtimeString (uint i) const |
bool | call (QObject *thisObject, void **a, const QMetaType *types, int argc, ExecutionContext *context) |
ReturnedValue | call (const Value *thisObject, const Value *argv, int argc, ExecutionContext *context) |
void | destroy () |
void | mark (QV4::MarkStack *ms) |
void | updateInternalClass (ExecutionEngine *engine, const QList< QByteArray > ¶meters) |
Heap::String * | name () const |
QString | sourceFile () const |
QUrl | finalUrl () const |
bool | isStrict () const |
bool | isArrowFunction () const |
bool | isGenerator () const |
bool | isClosureWrapper () const |
QQmlSourceLocation | sourceLocation () const |
Function * | nestedFunction () const |
Public Member Functions inherited from QV4::FunctionData | |
FunctionData (EngineBase *engine, ExecutableCompilationUnit *compilationUnit_) | |
Static Public Member Functions | |
static Function * | create (ExecutionEngine *engine, ExecutableCompilationUnit *unit, const CompiledData::Function *function, const QQmlPrivate::AOTCompiledFunction *aotFunction) |
static QString | prettyName (const Function *function, const void *address) |
Public Attributes | ||
const CompiledData::Function * | compiledFunction = nullptr | |
const char * | codeData = nullptr | |
JSC::MacroAssemblerCodeRef * | codeRef = nullptr | |
union { | ||
void * noFunction = nullptr | ||
JSTypedFunction jsTypedFunction | ||
AOTCompiledFunction aotCompiledFunction | ||
}; | ||
union { | ||
JittedCode jittedCode = nullptr | ||
AotCompiledCode aotCompiledCode | ||
}; | ||
QV4::WriteBarrier::Pointer< Heap::InternalClass > | internalClass | |
int | interpreterCallCount = 0 | |
quint16 | nFormals = 0 | |
Kind | kind = JsUntyped | |
bool | detectedInjectedParameters = false | |
Public Attributes inherited from QV4::FunctionData | ||
WriteBarrier::HeapObjectWrapper< CompilationUnitRuntimeData, 1 > | compilationUnit | |
Protected Member Functions | |
Function (ExecutionEngine *engine, ExecutableCompilationUnit *unit, const CompiledData::Function *function, const QQmlPrivate::AOTCompiledFunction *aotFunction) | |
~Function () | |
Definition at line 46 of file qv4function_p.h.
typedef void(* QV4::Function::AotCompiledCode) (const QQmlPrivate::AOTCompiledContext *context, void **argv) |
Definition at line 82 of file qv4function_p.h.
typedef ReturnedValue(* QV4::Function::JittedCode) (CppStackFrame *, ExecutionEngine *) |
Definition at line 81 of file qv4function_p.h.
enum QV4::Function::Kind : quint8 |
Enumerator | |
---|---|
JsUntyped | |
JsTyped | |
AotCompiled | |
Eval |
Definition at line 99 of file qv4function_p.h.
|
protected |
Definition at line 106 of file qv4function.cpp.
References AotCompiled, aotCompiledCode, aotCompiledFunction, QVarLengthArray< T, Prealloc >::append(), QV4::Attr_NotConfigurable, base, QV4::ExecutableCompilationUnit::baseCompilationUnit(), QV4::EngineBase::Class_CallContext, QV4::FunctionData::compilationUnit, compiledFunction, QQmlTypePrivate::compositeQmlType(), QVarLengthArray< T, Prealloc >::data(), engine, QV4::CompiledData::Function::formalsTable(), i, QV4::ExecutableCompilationUnit::ignoresFunctionSignature(), internalClass, QV4::isSpecificType(), JsTyped, jsTypedFunction, kind, QV4::CompiledData::Function::localsTable(), QQmlPropertyCacheCreatorBase::metaTypeForPropertyType(), QV4::CompiledData::Function::nFormals, nFormals, QV4::CompiledData::Function::nLocals, QQmlMetaType::qmlType(), QVarLengthArray< T, Prealloc >::reserve(), QVarLengthArray< T, Prealloc >::resize(), QV4::CompiledData::Function::returnType, QV4::Function::JSTypedFunction::types, and QV4::Function::AOTCompiledFunction::types.
Referenced by create().
|
protected |
Definition at line 177 of file qv4function.cpp.
References AotCompiled, aotCompiledFunction, codeRef, QV4::destroyFunctionTable(), Eval, JsTyped, jsTypedFunction, JsUntyped, and kind.
ReturnedValue Function::call | ( | const Value * | thisObject, |
const Value * | argv, | ||
int | argc, | ||
ExecutionContext * | context ) |
Definition at line 59 of file qv4function.cpp.
References AotCompiled, aotCompiledFunction, QV4::coerceAndCall(), compiledFunction, context, QV4::convertAndCall(), QV4::doCall(), JsTyped, jsTypedFunction, and kind.
bool Function::call | ( | QObject * | thisObject, |
void ** | a, | ||
const QMetaType * | types, | ||
int | argc, | ||
ExecutionContext * | context ) |
Definition at line 23 of file qv4function.cpp.
References AotCompiled, context, QV4::convertAndCall(), engine, QV4::Moth::VME::exec(), frame, and kind.
Referenced by QQmlJavaScriptExpression::evaluate(), and QQmlJavaScriptExpression::evaluate().
|
static |
Definition at line 82 of file qv4function.cpp.
References Function(), and engine.
Referenced by QV4::ExecutableCompilationUnit::populate().
void Function::destroy | ( | ) |
Definition at line 89 of file qv4function.cpp.
|
inline |
Definition at line 61 of file qv4function_p.h.
Referenced by QQmlJavaScriptExpression::setupFunction().
|
inline |
Definition at line 120 of file qv4function_p.h.
Referenced by QV4::ExecutionEngine::resolvedUrl().
|
inline |
Definition at line 123 of file qv4function_p.h.
References QV4::CompiledData::Function::flags.
Referenced by QV4::getSuperBase().
|
inline |
Definition at line 125 of file qv4function_p.h.
References QV4::CompiledData::Function::flags.
|
inline |
Definition at line 124 of file qv4function_p.h.
References QV4::CompiledData::Function::flags.
|
inline |
Definition at line 122 of file qv4function_p.h.
References QV4::CompiledData::Function::flags.
Referenced by QV4::Runtime::StoreProperty::call(), QV4::ExecutionContext::deleteProperty(), QV4::EvalFunction::evalCall(), and QJSEngine::evaluate().
void Function::mark | ( | QV4::MarkStack * | ms | ) |
Definition at line 94 of file qv4function.cpp.
References internalClass.
|
inline |
Definition at line 113 of file qv4function_p.h.
References QV4::CompiledData::Function::nameIndex.
Referenced by QV4::CppStackFrame::function().
|
inline |
Definition at line 129 of file qv4function_p.h.
References QV4::CompiledData::Function::nestedFunctionIndex.
Definition at line 245 of file qv4function.cpp.
References QString::number(), and prettyName().
Referenced by prettyName().
|
inline |
Definition at line 67 of file qv4function_p.h.
References i.
|
inline |
Definition at line 119 of file qv4function_p.h.
Referenced by QV4::CppStackFrame::source(), and sourceLocation().
QQmlSourceLocation Function::sourceLocation | ( | ) | const |
Definition at line 256 of file qv4function.cpp.
References QV4::CompiledData::Location::column(), compiledFunction, QV4::CompiledData::Location::line(), QV4::CompiledData::Function::location, and sourceFile().
Referenced by QQmlJavaScriptExpression::sourceLocation().
void Function::updateInternalClass | ( | ExecutionEngine * | engine, |
const QList< QByteArray > & | parameters ) |
Definition at line 197 of file qv4function.cpp.
References arg, QV4::Attr_NotConfigurable, QV4::EngineBase::Class_CallContext, QV4::FunctionData::compilationUnit, compiledFunction, engine, QString::fromUtf8(), i, internalClass, j, QV4::CompiledData::Function::localsTable(), nFormals, QV4::CompiledData::Function::nLocals, and QString::number().
union { ... } QV4::Function |
union { ... } QV4::Function |
AotCompiledCode QV4::Function::aotCompiledCode |
Definition at line 92 of file qv4function_p.h.
Referenced by Function().
AOTCompiledFunction QV4::Function::aotCompiledFunction |
Definition at line 87 of file qv4function_p.h.
Referenced by Function(), ~Function(), call(), and QQmlBinding::doUpdate().
const char* QV4::Function::codeData = nullptr |
Definition at line 78 of file qv4function_p.h.
JSC::MacroAssemblerCodeRef* QV4::Function::codeRef = nullptr |
Definition at line 79 of file qv4function_p.h.
Referenced by ~Function().
const CompiledData::Function* QV4::Function::compiledFunction = nullptr |
Definition at line 77 of file qv4function_p.h.
Referenced by Function(), call(), QV4::JSTypesStackFrame::requiredJSStackFrameSize(), sourceLocation(), and updateInternalClass().
bool QV4::Function::detectedInjectedParameters = false |
Definition at line 101 of file qv4function_p.h.
QV4::WriteBarrier::Pointer<Heap::InternalClass> QV4::Function::internalClass |
Definition at line 96 of file qv4function_p.h.
Referenced by Function(), mark(), and updateInternalClass().
int QV4::Function::interpreterCallCount = 0 |
Definition at line 97 of file qv4function_p.h.
JittedCode QV4::Function::jittedCode = nullptr |
Definition at line 91 of file qv4function_p.h.
JSTypedFunction QV4::Function::jsTypedFunction |
Definition at line 86 of file qv4function_p.h.
Referenced by Function(), ~Function(), and call().
Definition at line 100 of file qv4function_p.h.
Referenced by Function(), ~Function(), call(), call(), QQmlBinding::doUpdate(), and QV4::getSuperBase().
quint16 QV4::Function::nFormals = 0 |
Definition at line 98 of file qv4function_p.h.
Referenced by Function(), and updateInternalClass().
Definition at line 85 of file qv4function_p.h.