![]() |
Qt 6.x
The Qt SDK
|
#include <qv4string_p.h>
Public Types | |
enum | { IsString = true } |
![]() | |
enum | { IsStringOrSymbol = true } |
![]() | |
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 uint | createHashValue (const QChar *ch, int length, uint *subtype) |
static uint | createHashValue (const char *ch, int length, uint *subtype) |
template<typename T > | |
static uint | calculateHashValue (const T *ch, const T *end, uint *subtype) |
![]() | |
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) |
Static Protected Member Functions | |
static bool | virtualIsEqualTo (Managed *that, Managed *o) |
static qint64 | virtualGetLength (const Managed *m) |
![]() | |
static bool | virtualIsEqualTo (Managed *m, Managed *other) |
Definition at line 158 of file qv4string_p.h.
anonymous enum |
Enumerator | |
---|---|
IsString |
Definition at line 162 of file qv4string_p.h.
|
inlinestatic |
Definition at line 212 of file qv4string_p.h.
References ch, QV4::charToUInt(), and QV4::stringToArrayIndex().
Referenced by QV4::Heap::StringOrSymbol::createHashValue().
|
inlinestatic |
Definition at line 198 of file qv4string_p.h.
References ch.
|
inlinestatic |
Definition at line 192 of file qv4string_p.h.
References ch.
Referenced by QV4::IdentifierTable::asPropertyKey(), QV4::IdentifierTable::asPropertyKey(), QV4::IdentifierTable::insertString(), QV4::IdentifierTable::insertSymbol(), QHashedString::stringHash(), and QHashedString::stringHash().
void String::createPropertyKeyImpl | ( | ) | const |
Definition at line 124 of file qv4string.cpp.
References d, engine, Q_ASSERT, QV4::Heap::StringOrSymbol::StringType_AddedString, and QV4::Heap::StringOrSymbol::subtype.
|
inline |
|
inline |
Definition at line 184 of file qv4string_p.h.
References d.
|
inline |
|
inline |
Definition at line 176 of file qv4string_p.h.
References other().
Referenced by QV4::Runtime::CompareGreaterThan::call(), QV4::Runtime::CompareLessThan::call(), QV4::Runtime::CompareGreaterEqual::call(), and QV4::Runtime::CompareLessEqual::call().
Definition at line 167 of file qv4string_p.h.
References d.
|
inline |
Definition at line 204 of file qv4string_p.h.
References d.
|
inline |
Definition at line 166 of file qv4string_p.h.
References d.
|
inline |
Definition at line 180 of file qv4string_p.h.
References d.
Referenced by QV4::EvalFunction::evalCall(), QV4::RegExp::getSubstitution(), QV4::UrlSearchParamsPrototype::method_delete(), QV4::UrlSearchParamsPrototype::method_get(), QV4::UrlSearchParamsPrototype::method_getAll(), QV4::UrlSearchParamsPrototype::method_has(), QV4::UrlSearchParamsPrototype::method_set(), QV4::UrlPrototype::method_setHash(), QV4::UrlPrototype::method_setHost(), QV4::UrlPrototype::method_setHostname(), QV4::UrlPrototype::method_setHref(), QV4::UrlPrototype::method_setPassword(), QV4::UrlPrototype::method_setPathname(), QV4::UrlPrototype::method_setPort(), QV4::UrlPrototype::method_setProtocol(), QV4::UrlPrototype::method_setSearch(), QV4::UrlPrototype::method_setUsername(), and QV4::UrlCtor::virtualCallAsConstructor().
uint String::toUInt | ( | bool * | ok | ) | const |
Definition at line 106 of file qv4string.cpp.
References d, ok, QV4::RuntimeHelpers::stringToNumber(), QV4::Heap::StringOrSymbol::StringType_ArrayIndex, QV4::Heap::StringOrSymbol::StringType_Unknown, QV4::Heap::StringOrSymbol::subtype, and QV4::Heap::String::toQString().
Definition at line 208 of file qv4string.cpp.
References d.
Definition at line 43 of file qv4string.cpp.
References QV4::Heap::String::isEqualTo(), and o.