![]() |
Qt 6.x
The Qt SDK
|
#include <qv4functionobject_p.h>
Inherits QV4::Object.
Inherited by QV4::ArrayCtor, QV4::ArrowFunction, QV4::BooleanCtor, QV4::BoundFunction, QV4::CapabilitiesExecutorWrapper, QV4::DataViewCtor, QV4::DateCtor, QV4::DefaultClassConstructorFunction, QV4::DelegateModelGroupFunction, QV4::ErrorCtor, QV4::EvalFunction, QV4::FunctionCtor, QV4::FunctionPrototype, QV4::Heap::ArrayCtor, QV4::Heap::ArrowFunction, QV4::Heap::BooleanCtor, QV4::Heap::DataViewCtor, QV4::Heap::DateCtor, QV4::Heap::DefaultClassConstructorFunction, QV4::Heap::DelegateModelGroupFunction, QV4::Heap::ErrorCtor, QV4::Heap::EvalFunction, QV4::Heap::FunctionCtor, QV4::Heap::FunctionPrototype, QV4::Heap::GeneratorFunctionCtor, QV4::Heap::GeneratorPrototype, QV4::Heap::IndexedBuiltinFunction, QV4::Heap::IntrinsicTypedArrayCtor, QV4::Heap::NumberCtor, QV4::Heap::ObjectCtor, QV4::Heap::PromiseCtor, QV4::Heap::QMetaObjectWrapper, QV4::Heap::SharedArrayBufferCtor, QV4::Heap::StringCtor, QV4::Heap::SymbolCtor, QV4::Heap::TypedArrayCtor, QV4::Heap::UrlCtor, QV4::Heap::UrlSearchParamsCtor, QV4::Heap::WeakMapCtor, QV4::Heap::WeakSetCtor, QV4::IndexedBuiltinFunction, QV4::IntrinsicTypedArrayCtor, QV4::NumberCtor, QV4::ObjectCtor, QV4::PromiseCtor, QV4::Proxy, QV4::ProxyObject, QV4::QMetaObjectWrapper, QV4::QObjectMethod, QV4::QQmlBindingFunction, QV4::QQmlXMLHttpRequestCtor, QV4::RegExpCtor, QV4::RejectWrapper, QV4::ResolveElementWrapper, QV4::ResolveWrapper, QV4::SharedArrayBufferCtor, QV4::StringCtor, QV4::SymbolCtor, QV4::TypedArrayCtor, QV4::UrlCtor, QV4::UrlSearchParamsCtor, QV4::WeakMapCtor, and QV4::WeakSetCtor.
Public Types | |
enum | { IsFunctionObject = true } |
enum | { NInlineProperties = 1 } |
![]() | |
enum | { NInlineProperties = 2 } |
enum | { IsObject = true , GetterOffset = 0 , SetterOffset = 1 } |
enum | ThrowOnFailure { DoThrowOnRejection , DoNotThrow } |
![]() | |
enum | { IsExecutionContext = false , IsString = false , IsStringOrSymbol = false , IsObject = false , IsFunctionObject = false , IsErrorObject = false , IsArrayData = false } |
enum | { NInlineProperties = 0 } |
enum | Type { Type_Invalid , Type_String , Type_Object , Type_Symbol , Type_ArrayObject , Type_FunctionObject , Type_GeneratorObject , Type_BooleanObject , Type_NumberObject , Type_StringObject , Type_SymbolObject , Type_DateObject , Type_RegExpObject , Type_ErrorObject , Type_ArgumentsObject , Type_JsonObject , Type_MathObject , Type_ProxyObject , Type_UrlObject , Type_UrlSearchParamsObject , Type_ExecutionContext , Type_InternalClass , Type_SetIteratorObject , Type_MapIteratorObject , Type_ArrayIteratorObject , Type_StringIteratorObject , Type_ForInIterator , Type_RegExp , Type_V4Sequence , Type_QmlListProperty } |
![]() | |
using | ManagedPtr = Managed * |
![]() | |
enum class | TagBit { SpecialNegative = 0b10000000000000000000 << 12 , SpecialQNaN = 0b00000000000010000000 << 12 , Special = 0b00000000000001000000 << 12 , IntCompat = 0b00000000000000100000 << 12 , Unmanaged = 0b00000000000000010000 << 12 , IntOrBool = 0b00000000000000001000 << 12 , Number = 0b00000000000000000100 << 12 } |
enum | Type { Managed_Type = 0 , Double_Type = 1 , Undefined_Type = 2 , Empty_Type = quint32(TagBit::Unmanaged) , Null_Type = Empty_Type | quint32(TagBit::IntCompat) , Boolean_Type = Null_Type | quint32(TagBit::IntOrBool) , Integer_Type = Boolean_Type | quint32(TagBit::Number) } |
enum | { Tag_Shift = 32 , IsIntegerConvertible_Shift = 48 , IsIntegerConvertible_Value = 3 , IsIntegerOrBool_Shift = 47 , IsIntegerOrBool_Value = 7 } |
enum class | QuickType : quint32 { Managed = Managed_Type , Empty = Empty_Type , Null = Null_Type , Boolean = Boolean_Type , Integer = Integer_Type , PlusInf = quint32(TagBit::Number) | quint32(TagBit::Special) | quint32(TagBit::Unmanaged) , MinusInf = PlusInf | quint32(TagBit::SpecialNegative) , NaN = PlusInf | quint32(TagBit::SpecialQNaN) , MinusNaN = NaN | quint32(TagBit::SpecialNegative) } |
enum | { QT_Empty = Empty_Type , QT_Null = Null_Type , QT_Bool = Boolean_Type , QT_Int = Integer_Type , QuickType_Shift = Tag_Shift } |
using | HeapBasePtr = Heap::Base * |
using | ValueTypeInternal = QuickType |
Static Public Member Functions | |
static ReturnedValue | virtualCall (const FunctionObject *f, const Value *thisObject, const Value *argv, int argc) |
static void | virtualCallWithMetaTypes (const FunctionObject *f, QObject *thisObject, void **a, const QMetaType *types, int argc) |
static Heap::FunctionObject * | createScriptFunction (ExecutionContext *scope, Function *function) |
static Heap::FunctionObject * | createConstructorFunction (ExecutionContext *scope, Function *function, Object *homeObject, bool isDerivedConstructor) |
static Heap::FunctionObject * | createMemberFunction (ExecutionContext *scope, Function *function, Object *homeObject, String *name) |
static Heap::FunctionObject * | createBuiltinFunction (ExecutionEngine *engine, StringOrSymbol *nameOrSymbol, VTable::Call code, int argumentCount) |
![]() | |
static ReturnedValue | getValue (const Value *thisObject, const Value &v, PropertyAttributes attrs) |
static ReturnedValue | getValueAccessor (const Value *thisObject, const Value &v, PropertyAttributes attrs) |
static ReturnedValue | checkedInstanceOf (ExecutionEngine *engine, const FunctionObject *typeObject, const Value &var) |
![]() | |
static constexpr Value | fromStaticValue (StaticValue staticValue) |
static Value | fromHeapObject (HeapBasePtr m) |
static bool | toBooleanImpl (Value val) |
static double | toNumberImpl (Value v) |
static Heap::String * | toString (ExecutionEngine *e, Value val) |
static Heap::Object * | toObject (ExecutionEngine *e, Value val) |
static constexpr Value | fromReturnedValue (ReturnedValue val) |
static double | toInteger (double d) |
static int | toInt32 (double d) |
static unsigned int | toUInt32 (double d) |
static constexpr Value | emptyValue () |
static constexpr Value | fromBoolean (bool b) |
static constexpr Value | fromInt32 (int i) |
static constexpr Value | undefinedValue () |
static constexpr Value | nullValue () |
static Value | fromDouble (double d) |
static Value | fromUInt32 (uint i) |
![]() | |
static int | valueOffset () |
static int | tagOffset () |
static constexpr quint64 | tagValue (quint32 tag, quint32 value) |
static constexpr quint64 | tagBitMask (TagBit bit) |
static bool | integerCompatible (StaticValue a, StaticValue b) |
static bool | bothDouble (StaticValue a, StaticValue b) |
static QV4_NEARLY_ALWAYS_INLINE bool | isInt32 (double d) |
static constexpr StaticValue | fromReturnedValue (ReturnedValue val) |
static constexpr StaticValue | emptyValue () |
static constexpr StaticValue | fromBoolean (bool b) |
static constexpr StaticValue | fromInt32 (int i) |
static constexpr StaticValue | undefinedValue () |
static constexpr StaticValue | nullValue () |
static StaticValue | fromDouble (double d) |
static StaticValue | fromUInt32 (uint i) |
static double | toInteger (double d) |
static int | toInt32 (double d) |
static unsigned int | toUInt32 (double d) |
Definition at line 137 of file qv4functionobject_p.h.
anonymous enum |
Enumerator | |
---|---|
IsFunctionObject |
Definition at line 138 of file qv4functionobject_p.h.
anonymous enum |
Enumerator | |
---|---|
NInlineProperties |
Definition at line 146 of file qv4functionobject_p.h.
|
inline |
Definition at line 106 of file qv4jscall_p.h.
References call().
Referenced by call(), QV4::Runtime::TailCall::call(), call(), QV4::doInstanceof(), QV4::Promise::ReactionHandler::executeResolveThenable(), QV4::Heap::IndexedBuiltinFunction::init(), QV4::PromiseCtor::method_all(), QV4::Reflect::method_apply(), QV4::ArrayPrototype::method_every(), QV4::IntrinsicTypedArrayPrototype::method_every(), QV4::ArrayPrototype::method_filter(), QV4::IntrinsicTypedArrayPrototype::method_filter(), QV4::ArrayPrototype::method_find(), QV4::IntrinsicTypedArrayPrototype::method_find(), QV4::ArrayPrototype::method_findIndex(), QV4::IntrinsicTypedArrayPrototype::method_findIndex(), QV4::ArrayPrototype::method_forEach(), QV4::IntrinsicTypedArrayPrototype::method_forEach(), QV4::ArrayPrototype::method_map(), QV4::IntrinsicTypedArrayPrototype::method_map(), QV4::ArrayPrototype::method_reduce(), QV4::IntrinsicTypedArrayPrototype::method_reduce(), QV4::ArrayPrototype::method_reduceRight(), QV4::IntrinsicTypedArrayPrototype::method_reduceRight(), QV4::ArrayPrototype::method_some(), QV4::IntrinsicTypedArrayPrototype::method_some(), QV4::DatePrototype::method_toJSON(), QQmlLocalStorage::openDatabaseSync(), qmlsqldatabase_transaction_shared(), QV4::ProxyObject::virtualDefineOwnProperty(), QV4::ProxyObject::virtualDeleteProperty(), QV4::ProxyObject::virtualGet(), QV4::ProxyObject::virtualGetOwnProperty(), QV4::ProxyObject::virtualGetPrototypeOf(), QV4::ProxyObject::virtualHasProperty(), QV4::ProxyObject::virtualIsExtensible(), QV4::ProxyObject::virtualOwnPropertyKeys(), QV4::ProxyObject::virtualPreventExtensions(), QV4::ProxyObject::virtualPut(), and QV4::ProxyObject::virtualSetPrototypeOf().
|
inline |
Definition at line 168 of file qv4functionobject_p.h.
References d, engine, and QStringLiteral.
Definition at line 124 of file qv4functionobject.cpp.
References call(), QV4::convertAndCall(), d, and QV4::Managed::engine().
|
inline |
Definition at line 100 of file qv4jscall_p.h.
References callAsConstructor().
Referenced by callAsConstructor(), QV4::RegExpPrototype::method_compile(), QV4::IntrinsicTypedArrayCtor::method_from(), QV4::IntrinsicTypedArrayCtor::method_of(), QV4::StringPrototype::method_search(), QV4::RegExpPrototype::method_split(), QV4::ExecutionEngine::newPromiseObject(), QV4::SharedArrayBufferPrototype::slice(), and typedArraySpeciesCreate().
|
inline |
Definition at line 162 of file qv4functionobject_p.h.
References d, engine, and QStringLiteral.
|
inline |
Definition at line 148 of file qv4functionobject_p.h.
References d.
Referenced by QV4::Runtime::TailCall::call().
|
static |
Definition at line 179 of file qv4functionobject.cpp.
References QV4::MemoryManager::allocate(), QV4::Managed::engine(), QV4::Value::fromInt32(), QChar::fromLatin1(), function(), QV4::ExecutionEngine::id_length(), QV4::EngineBase::memoryManager, QString::mid(), name(), QV4::ExecutionEngine::newString(), QV4::ExecutionEngine::rootContext(), scope(), and QV4::StringOrSymbol::toQString().
Referenced by QV4::ExecutionEngine::ExecutionEngine(), WorkerScript::WorkerScript(), QV4::Object::defineAccessorProperty(), QV4::Object::defineDefaultProperty(), QV4::IntrinsicTypedArrayPrototype::init(), QV4::ArrayPrototype::init(), QV4::DatePrototype::init(), QV4::MapPrototype::init(), and QV4::SetPrototype::init().
|
static |
Definition at line 159 of file qv4functionobject.cpp.
References function(), scope(), and QV4::Object::set().
Definition at line 113 of file qv4functionobject.cpp.
References QV4::Attr_NotConfigurable, QV4::Attr_NotEnumerable, QV4::EngineBase::Class_ObjectProto, d, QV4::Object::defineDefaultProperty(), and Q_ASSERT.
|
static |
Definition at line 172 of file qv4functionobject.cpp.
References function(), name(), scope(), and QV4::Object::set().
|
static |
Definition at line 152 of file qv4functionobject.cpp.
References function(), QV4::Function::isArrowFunction(), and scope().
Referenced by QV4::EvalFunction::evalCall(), and QV4::FunctionCtor::virtualCallAsConstructor().
|
inline |
Definition at line 153 of file qv4functionobject_p.h.
References d.
Referenced by QV4::Runtime::TailCall::call().
|
inline |
Definition at line 150 of file qv4functionobject_p.h.
References d.
Referenced by QV4::Runtime::TailCall::call(), QV4::GeneratorFunction::create(), QV4::MemberGeneratorFunction::create(), createBuiltinFunction(), createConstructorFunction(), createMemberFunction(), createScriptFunction(), QV4::EvalFunction::evalCall(), QV4::Heap::GeneratorFunction::init(), QV4::FunctionCtor::parse(), qfoDoCall(), QV4::GeneratorFunction::virtualCall(), QV4::ArrowFunction::virtualCall(), and QV4::ArrowFunction::virtualCallWithMetaTypes().
ReturnedValue FunctionObject::getHomeObject | ( | ) | const |
Definition at line 191 of file qv4functionobject.cpp.
References QV4::Encode::undefined().
|
inline |
Definition at line 195 of file qv4functionobject_p.h.
|
inline |
Definition at line 256 of file qqmlbuiltinfunctions_p.h.
References d.
|
inline |
Definition at line 302 of file qv4functionobject_p.h.
References d.
|
inline |
Definition at line 186 of file qv4functionobject_p.h.
References d.
Referenced by QV4::Runtime::CreateClass::call(), QV4::IntrinsicTypedArrayCtor::method_from(), and QV4::IntrinsicTypedArrayCtor::method_of().
ReturnedValue FunctionObject::name | ( | ) | const |
Definition at line 137 of file qv4functionobject.cpp.
References QV4::Heap::InternalClass::engine, QV4::Object::get(), QV4::ExecutionEngine::id_name(), QV4::Managed::internalClass(), and scope().
Referenced by QV4::ExecutionEngine::ExecutionEngine(), createBuiltinFunction(), createMemberFunction(), QV4::ProxyFunctionObject::virtualCall(), and QV4::ProxyFunctionObject::virtualCallAsConstructor().
|
inline |
Definition at line 192 of file qv4functionobject_p.h.
Referenced by QV4::ScriptFunction::virtualCallAsConstructor(), QV4::ArrayBufferCtor::virtualCallAsConstructor(), and QV4::TypedArrayCtor::virtualCallAsConstructor().
|
inline |
Definition at line 149 of file qv4functionobject_p.h.
References d.
Referenced by QV4::Runtime::TailCall::call(), QV4::WeakMapCtor::construct(), QV4::WeakSetCtor::construct(), QV4::GeneratorFunction::create(), QV4::MemberGeneratorFunction::create(), createBuiltinFunction(), createConstructorFunction(), createMemberFunction(), createScriptFunction(), QV4::EvalFunction::evalCall(), QV4::FunctionPrototype::init(), QV4::GeneratorPrototype::init(), QV4::Heap::SharedArrayBufferCtor::init(), QV4::Heap::ArrayCtor::init(), QV4::Heap::BooleanCtor::init(), QV4::Heap::DataViewCtor::init(), QV4::Heap::DateCtor::init(), QV4::Heap::FunctionCtor::init(), QV4::Heap::GeneratorFunctionCtor::init(), QV4::Heap::EvalFunction::init(), QV4::Heap::WeakMapCtor::init(), QV4::Heap::NumberCtor::init(), QV4::Heap::ObjectCtor::init(), QV4::Heap::WeakSetCtor::init(), QV4::Heap::StringCtor::init(), QV4::Heap::UrlCtor::init(), QV4::Heap::GeneratorFunction::init(), QV4::Heap::IndexedBuiltinFunction::init(), QV4::Heap::TypedArrayCtor::init(), QV4::QQmlXMLHttpRequestCtor::method_abort(), QV4::FunctionPrototype::method_apply(), QV4::FunctionPrototype::method_bind(), QV4::SymbolCtor::method_for(), QV4::IntrinsicTypedArrayCtor::method_from(), QV4::QQmlXMLHttpRequestCtor::method_get_readyState(), QV4::QQmlXMLHttpRequestCtor::method_get_response(), QV4::QQmlXMLHttpRequestCtor::method_get_responseText(), QV4::QQmlXMLHttpRequestCtor::method_get_responseType(), QV4::QQmlXMLHttpRequestCtor::method_get_responseURL(), QV4::QQmlXMLHttpRequestCtor::method_get_responseXML(), QV4::QQmlXMLHttpRequestCtor::method_get_status(), QV4::QQmlXMLHttpRequestCtor::method_get_statusText(), QV4::QQmlXMLHttpRequestCtor::method_getAllResponseHeaders(), QV4::QQmlXMLHttpRequestCtor::method_getResponseHeader(), QV4::IntrinsicTypedArrayCtor::method_of(), QV4::QQmlXMLHttpRequestCtor::method_open(), QV4::QQmlXMLHttpRequestCtor::method_overrideMimeType(), QV4::StringCtor::method_raw(), QV4::QQmlXMLHttpRequestCtor::method_send(), QV4::QQmlXMLHttpRequestCtor::method_set_responseType(), QV4::QQmlXMLHttpRequestCtor::method_setRequestHeader(), QV4::FunctionPrototype::method_toString(), name(), qfoDoCall(), QV4::QQmlXMLHttpRequestCtor::setupProto(), QV4::GeneratorFunction::virtualCall(), QV4::WeakMapCtor::virtualCall(), QV4::ProxyFunctionObject::virtualCall(), QV4::WeakSetCtor::virtualCall(), QV4::BooleanCtor::virtualCallAsConstructor(), QV4::DateCtor::virtualCallAsConstructor(), QV4::DefaultClassConstructorFunction::virtualCallAsConstructor(), QV4::UrlCtor::virtualCallAsConstructor(), QV4::UrlSearchParamsCtor::virtualCallAsConstructor(), QV4::QQmlXMLHttpRequestCtor::virtualCallAsConstructor(), QV4::SharedArrayBufferCtor::virtualCallAsConstructor(), QV4::ArrayBufferCtor::virtualCallAsConstructor(), QV4::DataViewCtor::virtualCallAsConstructor(), QV4::FunctionCtor::virtualCallAsConstructor(), QV4::GeneratorFunctionCtor::virtualCallAsConstructor(), QV4::NumberCtor::virtualCallAsConstructor(), QV4::ObjectCtor::virtualCallAsConstructor(), QV4::ProxyFunctionObject::virtualCallAsConstructor(), QV4::RegExpCtor::virtualCallAsConstructor(), QV4::StringCtor::virtualCallAsConstructor(), QV4::TypedArrayCtor::virtualCallAsConstructor(), QV4::ArrayCtor::virtualCallAsConstructor(), and QV4::ArrowFunction::virtualCallWithMetaTypes().
Definition at line 156 of file qv4functionobject_p.h.
References engine.
QQmlSourceLocation FunctionObject::sourceLocation | ( | ) | const |
Definition at line 202 of file qv4functionobject.cpp.
References d.
|
inline |
Definition at line 183 of file qv4functionobject_p.h.
References d.
|
inline |
Definition at line 154 of file qv4functionobject_p.h.
References d.
|
static |
Definition at line 142 of file qv4functionobject.cpp.
References QV4::Encode::undefined().
|
static |
Definition at line 147 of file qv4functionobject.cpp.