8#include <QtQml/private/qv4mm_p.h>
10#include <QtCore/private/qnumeric_p.h>
26 if (
s->subtype < StringType_Complex)
30 if (cs->
subtype == StringType_AddedString) {
48 if (!
o->vtable()->isString)
70 if (
left->subtype >= StringType_Complex)
74 if (
right->subtype >= StringType_Complex)
77 largestSubLength =
qMax(largestSubLength,
right->length());
80 if (
len > 256 &&
len >= 2*largestSubLength)
99 internalClass->engine->memoryManager->changeUnmanagedHeapSizeUsage(
102 text().~QStringPrivate();
111 d()->createHashValue();
113 return d()->stringHash;
127 d()->simplifyString();
129 engine()->identifierTable->asPropertyKey(
this);
134 Q_ASSERT(subtype >= StringType_AddedString);
145 internalClass->engine->memoryManager->changeUnmanagedHeapSizeUsage(
147 subtype = StringType_Unknown;
152 if (subtype == StringType_AddedString)
157 if (subtype == StringType_SubString) {
173 std::vector<const String *> worklist;
174 worklist.reserve(32);
175 worklist.push_back(
data);
177 while (!worklist.empty()) {
181 if (
item->subtype == StringType_AddedString) {
183 worklist.push_back(cs->
right);
184 worklist.push_back(cs->
left);
185 }
else if (
item->subtype == StringType_SubString) {
198 if (subtype >= StringType_AddedString) {
199 Q_ASSERT(internalClass->vtable->isString);
200 static_cast<const Heap::String *
>(
this)->simplifyString();
202 Q_ASSERT(subtype < StringType_AddedString);
210 return static_cast<const String *
>(
m)->
d()->length();
constexpr bool isUpper() const noexcept
Returns true if the character is an uppercase letter, for example category() is Letter_Uppercase.
QVariant data(int key) const
Returns this item's custom data for the key key as a QVariant.
\macro QT_RESTRICTED_CAST_FROM_ASCII
const QChar * constData() const
Returns a pointer to the data stored in the QString.
qsizetype size() const
Returns the number of characters in this string.
QChar * data()
Returns a pointer to the data stored in the QString.
list append(new Employee("Blackpool", "Stephen"))
\qmltype Particle \inqmlmodule QtQuick.Particles
constexpr Initialization Uninitialized
constexpr const T & qMax(const T &a, const T &b)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLenum GLsizei length
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLintptr offset
#define DEFINE_MANAGED_VTABLE(classname)
void mark(QV4::MarkStack *markStack)
void createHashValue() const
static void markObjects(Heap::Base *that, MarkStack *markStack)
static void markObjects(Heap::Base *that, MarkStack *markStack)
bool startsWithUpper() const
QString toQString() const
void simplifyString() const
bool isEqualTo(const String *other) const
void mark(MarkStack *markStack)
StringOrSymbol * asStringOrSymbol() const
static PropertyKey invalid()
static double stringToNumber(const QString &s)
Q_NEVER_INLINE void createPropertyKeyImpl() const
uint toUInt(bool *ok) const
QString toQString() const
static uint calculateHashValue(const T *ch, const T *end, uint *subtype)
static constexpr VTable::GetLength virtualGetLength
static constexpr VTable::IsEqualTo virtualIsEqualTo