5#include <private/qv4compileddata_p.h>
6#include <private/qv4codegen_p.h>
7#include <private/qqmljsdiagnosticmessage_p.h>
9#include <QtCore/QTextStream>
13#include <QLoggingCategory>
14#if QT_CONFIG(regularexpression)
15#include <QRegularExpression>
17#include <QtCore/QTimeZone>
18#include <QtCore/qiterable.h>
43#include <private/qv4mm_p.h>
69#include <private/qjsvalue_p.h>
70#include <private/qqmltypewrapper_p.h>
71#include <private/qqmlvaluetypewrapper_p.h>
72#include <private/qqmlvaluetype_p.h>
73#include <private/qqmllistwrapper_p.h>
74#include <private/qqmllist_p.h>
75#include <private/qqmltypeloader_p.h>
76#include <private/qqmlbuiltinfunctions_p.h>
77#if QT_CONFIG(qml_locale)
78#include <private/qqmllocale_p.h>
80#if QT_CONFIG(qml_xml_http_request)
81#include <private/qv4domerrors_p.h>
82#include <private/qqmlxmlhttprequest_p.h>
84#include <private/qv4sqlerrors_p.h>
89#include <private/qqmlengine_p.h>
92#include <valgrind/memcheck.h>
109int ExecutionEngine::s_maxCallDepth = -1;
110int ExecutionEngine::s_jitCallCountThreshold = 3;
111int ExecutionEngine::s_maxJSStackSize = 4 * 1024 * 1024;
112int ExecutionEngine::s_maxGCStackSize = 2 * 1024 * 1024;
116 return b->engine()->throwTypeError();
120template <
typename ReturnType>
135void createNewIteratorIfNonExisting(
void **iterator) {
136 if (*iterator ==
nullptr)
148 iface.sizeFn = [](
const void *) {
return qsizetype(0); };
149 iface.valueAtIndexFn = [](
const void *,
qsizetype,
void *) {};
153 iface.advanceIteratorFn = [](
void *,
qsizetype) {};
154 iface.compareIteratorFn = [](
const void *,
const void *) {
157 iface.destroyIteratorFn = [](
const void *) {};
158 iface.copyIteratorFn = [](
void *,
const void *) {};
159 iface.diffIteratorFn = [](
const void *,
const void *) {
return qsizetype(0); };
167 iface.valueMetaType = QtPrivate::qMetaTypeInterfaceForType<QVariant>();
168 iface.iteratorCapabilities = RandomAccessCapability | BiDirectionalCapability | ForwardCapability;
169 iface.addRemoveCapabilities = CanAddAtEnd;
170 iface.sizeFn = [](
const void *
p) ->
qsizetype {
180 iface.valueAtIndexFn = [](
const void *iterable,
qsizetype index,
void *dataPtr) ->
void {
185 void *iterator =
nullptr;
186 createNewIteratorIfNonExisting(&iterator);
188 jsArrayIterator->
index = 0;
189 jsArrayIterator->data =
reinterpret_cast<QJSValue const*
>(iterable);
190 if (
pos == QMetaSequenceInterface::AtEnd) {
198 void *iterator =
nullptr;
199 createNewIteratorIfNonExisting(&iterator);
201 jsArrayIterator->
index = 0;
202 jsArrayIterator->data =
reinterpret_cast<QJSValue const*
>(iterable);
203 if (
pos == QMetaSequenceInterface::AtEnd) {
210 iface.advanceIteratorFn = [](
void *iterator,
qsizetype advanceBy) {
213 iface.advanceConstIteratorFn = [](
void *iterator,
qsizetype advanceBy) {
216 iface.valueAtIteratorFn = [](
const void *iterator,
void *dataPtr) ->
void {
217 const auto *arrayIterator =
static_cast<const JSArrayIterator *
>(iterator);
218 const QJSValue *jsArray = arrayIterator->data;
222 iface.valueAtConstIteratorFn = [](
const void *iterator,
void *dataPtr) ->
void {
223 const auto *arrayIterator =
static_cast<const JSArrayIterator *
>(iterator);
224 const QJSValue *jsArray = arrayIterator->data;
228 iface.destroyIteratorFn = [](
const void *iterator) {
231 iface.destroyConstIteratorFn = [](
const void *iterator) {
234 iface.compareIteratorFn = [](
const void *
p,
const void *
other) {
237 return this_->
index == that_->index && this_->data == that_->data;
239 iface.compareConstIteratorFn = [](
const void *
p,
const void *
other) {
242 return this_->
index == that_->index && this_->data == that_->data;
244 iface.copyIteratorFn = [](
void *iterator,
const void *otherIterator) {
245 auto *otherIter = (
static_cast<JSArrayIterator const *
>(otherIterator));
249 iface.copyConstIteratorFn = [](
void *iterator,
const void *otherIterator) {
250 auto *otherIter = (
static_cast<JSArrayIterator const *
>(otherIterator));
254 iface.diffIteratorFn = [](
const void *iterator,
const void *otherIterator) ->
qsizetype {
257 return self->index -
other->index;
259 iface.diffConstIteratorFn = [](
const void *iterator,
const void *otherIterator) ->
qsizetype {
262 return self->index -
other->index;
265 auto *jsvalue =
static_cast<QJSValue *
>(iterable);
271 int len =
a->getLength();
282 if (!
value.isArray()) {
291void ExecutionEngine::initializeStaticMembers()
296 if (
ok && envMaxJSStackSize > 0)
297 s_maxJSStackSize = envMaxJSStackSize;
300 if (
ok && envMaxGCStackSize > 0)
301 s_maxGCStackSize = envMaxGCStackSize;
304 s_maxCallDepth = std::numeric_limits<qint32>::max();
308 if (!
ok || s_maxCallDepth <= 0)
315 s_jitCallCountThreshold = 3;
317 s_jitCallCountThreshold = std::numeric_limits<int>::max();
319 qMetaTypeId<QJSValue>();
320 qMetaTypeId<QList<int> >();
322 if (!QMetaType::hasRegisteredConverterFunction<QJSValue, QVariantMap>())
323 QMetaType::registerConverter<QJSValue, QVariantMap>(convertJSValueToVariantType<QVariantMap>);
324 if (!QMetaType::hasRegisteredConverterFunction<QJSValue, QVariantList>())
325 QMetaType::registerConverter<QJSValue, QVariantList>(convertJSValueToVariantType<QVariantList>);
326 if (!QMetaType::hasRegisteredConverterFunction<QJSValue, QStringList>())
327 QMetaType::registerConverter<QJSValue, QStringList>(convertJSValueToVariantType<QStringList>);
328 if (!QMetaType::hasRegisteredConverterFunction<QJSValue, QSequentialIterable>())
335 , bumperPointerAllocator(new
WTF::BumpPointerAllocator)
337 , gcStack(new
WTF::PageAllocation)
339 , publicEngine(jsEngine)
342 , m_multiplyWrappedQObjects(
nullptr)
344 , m_canAllocateExecutableMemory(OSAllocator::canAllocateExecutableMemory())
347 , m_xmlHttpRequestData(
nullptr)
352 initializeStaticMembers();
361 if (s_maxCallDepth < 0) {
370 const size_t guardPages = 2 * WTF::pageSize();
376 *
jsStack = WTF::PageAllocation::allocate(
377 s_maxJSStackSize + 256*1024 + guardPages, WTF::OSAllocator::JSVMStackPages,
380#ifdef V4_USE_VALGRIND
381 VALGRIND_MAKE_MEM_UNDEFINED(
jsStackBase, m_maxJSStackSize + 256*1024);
386 *
gcStack = WTF::PageAllocation::allocate(
387 s_maxGCStackSize + guardPages, WTF::OSAllocator::JSVMStackPages,
527#if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS)
531 auto *
index = &_index;
534 auto addProtoHasInstance = [&] {
539 Q_ASSERT(
index->index == Heap::FunctionObject::Index_Prototype);
544 Q_ASSERT(
index->index == Heap::FunctionObject::Index_HasInstance);
546 addProtoHasInstance();
549 addProtoHasInstance();
556 ic = ic->changeVTable(MemberFunction::staticVTable());
558 ic = ic->changeVTable(GeneratorFunction::staticVTable());
560 ic = ic->changeVTable(MemberGeneratorFunction::staticVTable());
564 ic = ic->changeVTable(ScriptFunction::staticVTable());
566 ic = ic->changeVTable(ConstructorFunction::staticVTable());
570 Q_ASSERT(
index->index == Heap::FunctionObject::Index_ProtoConstructor);
624 ic =
newInternalClass(SequencePrototype::staticVTable(), SequencePrototype::defaultPrototype(
this));
834 t->setInternalClass(
t->internalClass()->cryopreserved());
845 m_delayedCallQueue.
init(
this);
852 for (
auto val : nativeModules) {
855 nativeModules.clear();
875#if QT_CONFIG(qml_xml_http_request)
877 m_xmlHttpRequestData =
nullptr;
881#if QT_CONFIG(qml_debug)
899 r->d_unchecked()->init(Heap::ExecutionContext::Type_GlobalContext);
917 return ic->changePrototype(prototype ? prototype->d() :
nullptr);
970 object->arrayReserve(
count);
971 object->setArrayLengthUnchecked(
count);
985 d->type = Heap::ArrayData::Simple;
992 a->d()->arrayData.set(
this,
d);
993 a->setArrayLengthUnchecked(
length);
1061#if QT_CONFIG(regularexpression)
1077 urlObject->setUrl(
url);
1078 return urlObject->d();
1088 return ErrorObject::create<ErrorObject>(
this,
value,
errorCtor());
1093 return ErrorObject::create<ErrorObject>(
this,
message);
1098 return ErrorObject::create<SyntaxErrorObject>(
this,
message);
1109 return ErrorObject::create<ReferenceErrorObject>(
this,
message);
1120 return ErrorObject::create<TypeErrorObject>(
this,
message);
1125 return ErrorObject::create<RangeErrorObject>(
this,
message);
1135 if (!m_reactionHandler) {
1146 if (!m_reactionHandler) {
1152 executor->d()->capabilities.set(
this, capability->d());
1162 return m_reactionHandler.
data();
1167 return ErrorObject::create<URIErrorObject>(
this,
message);
1172 return ErrorObject::create<EvalErrorObject>(
this,
message);
1215 return ctx->qml()->scopeObject;
1224 return ctx->qml()->context;
1234 while (
f && frameLimit) {
1236 frame.source =
f->source();
1237 frame.function =
f->function();
1238 frame.line =
f->lineNumber();
1241 if (
f->isJSTypesFrame()) {
1249 f =
f->parentFrame();
1269 for (
int i = 0;
i < stackTrace.
size(); ++
i) {
1274 str <<
"frame={level=\"" <<
i <<
"\",func=\"" << stackTrace.
at(
i).function
1276 <<
"\",line=\"" <<
qAbs(stackTrace.
at(
i).line) <<
"\",language=\"js\"}";
1297 if (!
src.isRelative())
1303 if (
f->v4Function) {
1304 base =
f->v4Function->finalUrl();
1307 f =
f->parentFrame();
1329 compilationUnit->markObjects(markStack);
1351 debug->aboutToThrow();
1468 if (!
trace.isEmpty()) {
1501 return v->d()->data();
1503 if (metaType == QMetaType::fromType<bool>())
1506 if (metaType == QMetaType::fromType<double>())
1509 if (metaType == QMetaType::fromType<float>())
1512 if (metaType == QMetaType::fromType<QJsonValue>())
1515 if (metaType == QMetaType::fromType<QJSValue>())
1521 if (metaType == QMetaType::fromType<QJsonObject>()
1525 return QVariant::fromValue<QObject *>(
wrapper->object());
1529 return w->toVariant();
1531 return v->toVariant();
1533 return l->toVariant();
1547 qobjectWrapper =
a->get(ii);
1548 if (!!qobjectWrapper) {
1549 list << qobjectWrapper->object();
1555 return QVariant::fromValue<QList<QObject*> >(
list);
1556 }
else if (metaType == QMetaType::fromType<QJsonArray>()) {
1565 retn =
QVariant(metaType,
nullptr);
1567 if (retnAsIterable.metaContainer().canAddValue()) {
1568 QMetaType valueMetaType = retnAsIterable.metaContainer().valueMetaType();
1569 auto const length =
a->getLength();
1572 arrayValue =
a->get(
i);
1574 arrayValue, valueMetaType);
1576 retnAsIterable.metaContainer().addValue(retn.
data(), asVariant.
constData());
1586 if (asVariant.
convert(valueMetaType)) {
1587 retnAsIterable.metaContainer().addValue(retn.
data(), asVariant.
constData());
1592 asVariant =
toVariant(arrayValue, valueMetaType,
false, visitedObjects);
1593 if (valueMetaType == QMetaType::fromType<QVariant>()) {
1594 retnAsIterable.metaContainer().addValue(retn.
data(), &asVariant);
1596 auto originalType = asVariant.
metaType();
1597 bool couldConvert = asVariant.
convert(valueMetaType);
1598 if (!couldConvert) {
1601 "at position %1 from %2 to %3")
1606 asVariant =
QVariant(valueMetaType,
nullptr);
1608 retnAsIterable.metaContainer().addValue(retn.
data(), asVariant.
constData());
1616 if (
value.isUndefined())
1620 if (
value.isBoolean())
1621 return value.booleanValue();
1622 if (
value.isInteger())
1623 return value.integerValue();
1624 if (
value.isNumber())
1625 return value.asDouble();
1629 if (metaType == QMetaType::fromType<QChar>() &&
str.
size() == 1)
1633#if QT_CONFIG(qml_locale)
1635 return *ld->d()->locale;
1641 if (metaType == QMetaType::fromType<QDate>())
1644 if (metaType == QMetaType::fromType<QTime>())
1645 return d->toQDateTime().time();
1647 if (metaType == QMetaType::fromType<QString>())
1648 return d->toString();
1650 return d->toQDateTime();
1655 return d->asByteArray();
1657 return createJSValueForObjectsAndSymbols
1659 :
symbol->descriptiveString();
1667#if QT_CONFIG(regularexpression)
1669 return re->toQRegularExpression();
1678 if (createJSValueForObjectsAndSymbols)
1688 return ::toVariant(
value, typeHint, createJSValueForObjectsAndSymbols,
nullptr);
1696 if (!visitedObjects) {
1697 visitedObjects = &recursionGuardSet;
1698 }
else if (visitedObjects->
contains(
o->d())) {
1706 visitedObjects->
insert(
o->d());
1717 for (
int ii = 0; ii <
length; ++ii) {
1724 }
else if (
o->getPrototypeOf() ==
o->engine()->objectPrototype()->d()) {
1731 name =
it.nextPropertyNameAsString(
val);
1738 false, visitedObjects));
1747 visitedObjects->
remove(
o->d());
1765 this, metaType, metaSequence,
ptr,
1772 const int type = metaType.
id();
1776 case QMetaType::Void:
1778 case QMetaType::Nullptr:
1779 case QMetaType::VoidStar:
1781 case QMetaType::Bool:
1783 case QMetaType::Int:
1785 case QMetaType::UInt:
1787 case QMetaType::Long:
1788 return QV4::Encode((
double)*
reinterpret_cast<const long *
>(
ptr));
1789 case QMetaType::ULong:
1791 case QMetaType::LongLong:
1793 case QMetaType::ULongLong:
1795 case QMetaType::Double:
1797 case QMetaType::QString:
1799 case QMetaType::QByteArray:
1801 case QMetaType::Float:
1803 case QMetaType::Short:
1805 case QMetaType::UShort:
1806 return QV4::Encode((
int)*
reinterpret_cast<const unsigned short*
>(
ptr));
1807 case QMetaType::Char:
1809 case QMetaType::UChar:
1810 return QV4::Encode((
int)*
reinterpret_cast<const unsigned char*
>(
ptr));
1811 case QMetaType::SChar:
1812 return QV4::Encode((
int)*
reinterpret_cast<const signed char*
>(
ptr));
1813 case QMetaType::QChar:
1815 case QMetaType::Char16:
1817 case QMetaType::QDateTime:
1821 case QMetaType::QDate:
1823 *
reinterpret_cast<const QDate *
>(
ptr),
1825 case QMetaType::QTime:
1827 *
reinterpret_cast<const QTime *
>(
ptr),
1829#if QT_CONFIG(regularexpression)
1830 case QMetaType::QRegularExpression:
1833 case QMetaType::QObjectStar:
1835 case QMetaType::QStringList:
1836 return createSequence(QMetaSequence::fromContainer<QStringList>());
1837 case QMetaType::QVariantList:
1838 return createSequence(QMetaSequence::fromContainer<QVariantList>());
1839 case QMetaType::QVariantMap:
1841 case QMetaType::QJsonValue:
1843 case QMetaType::QJsonObject:
1845 case QMetaType::QJsonArray:
1847#if QT_CONFIG(qml_locale)
1848 case QMetaType::QLocale:
1851 case QMetaType::QPixmap:
1852 case QMetaType::QImage:
1864 if (metaType == QMetaType::fromType<QQmlListReference>()) {
1879 }
else if (metaType == QMetaType::fromType<QJSValue>()) {
1889 for (
int ii = 0; ii <
list.
size(); ++ii)
1891 a->setArrayLengthUnchecked(
list.
size());
1892 return a.asReturnedValue();
1898 }
else if (metaType == QMetaType::fromType<QJSPrimitiveValue>()) {
1900 switch (primitive->
type()) {
1902 return Encode(primitive->asBoolean());
1904 return Encode(primitive->asInteger());
1912 return Encode(primitive->asDouble());
1919 this,
ptr, vtmo, metaType,
1944 return a.asReturnedValue();
1980 key =
s->propertyKey();
1982 if (
key->isArrayIndex())
1983 o->arraySet(
key->asArrayIndex(),
v);
1985 o->insertMember(
s,
v);
1987 return o.asReturnedValue();
1996 if (
type == QMetaType::fromType<QVariant>()) {
2000 }
else if (
type == QMetaType::fromType<QUrl>()) {
2010 return s_maxJSStackSize;
2015 return s_maxGCStackSize;
2026 if (len64 < 0ll || len64 >
qint64(std::numeric_limits<int>::max())) {
2056 cachedUnit->qmlData, cachedUnit->aotCompiledFunctions,
2080 sourceCode, sourceTimeStamp, &diagnostics);
2086 qWarning() <<
url <<
':' <<
m.loc.startLine <<
':' <<
m.loc.startColumn
2087 <<
": warning: " <<
m.message;
2099 modules.insert(moduleUnit->finalUrl(), moduleUnit);
2106 const auto nativeModule = nativeModules.find(
url);
2107 if (nativeModule != nativeModules.end())
2108 return Module {
nullptr, *nativeModule };
2110 const QUrl resolved = referrer
2113 auto existingModule = modules.find(resolved);
2114 if (existingModule == modules.end())
2115 return Module {
nullptr,
nullptr };
2116 return Module { *existingModule,
nullptr };
2122 const auto nativeModule = nativeModules.find(
url);
2123 if (nativeModule != nativeModules.end())
2124 return Module {
nullptr, *nativeModule };
2126 const QUrl resolved = referrer
2129 auto existingModule = modules.find(resolved);
2130 if (existingModule != modules.end())
2131 return Module { *existingModule,
nullptr };
2138 modules.insert(resolved, newModule);
2141 return Module { newModule,
nullptr };
2147 const auto existingModule = nativeModules.find(
url);
2148 if (existingModule != nativeModules.end())
2153 nativeModules.insert(
url,
val);
2162 return DiskCache::Enabled;
2164 ExecutionEngine::DiskCacheOptions
result = DiskCache::Disabled;
2167 if (
option ==
"aot-bytecode")
2168 result |= DiskCache::AotByteCode;
2169 else if (
option ==
"aot-native")
2170 result |= DiskCache::AotNative;
2171 else if (
option ==
"aot")
2172 result |= DiskCache::Aot;
2173 else if (
option ==
"qmlc-read")
2174 result |= DiskCache::QmlcRead;
2175 else if (
option ==
"qmlc-write")
2176 result |= DiskCache::QmlcWrite;
2177 else if (
option ==
"qmlc")
2178 result |= DiskCache::Qmlc;
2180 qWarning() <<
"Ignoring unknown option to QML_DISK_CACHE:" <<
option;
2188 if (forceDiskCache())
2190 if (disableDiskCache() ||
debugger())
2203 void *dummyArgs[] = {
nullptr };
2204 QMetaType dummyTypes[] = { QMetaType::fromType<void>() };
2235#if QT_CONFIG(qml_locale)
2241#if QT_CONFIG(qml_xml_http_request)
2252 m_illegalNames.
insert(
id.toQString());
2269 scope, qtObjectWrapper->getPrototypeOf());
2271 qtNamespaceWrapper->setPrototypeOf(qtObjectProtoWrapper);
2272 qtObjectWrapper->setPrototypeOf(qtNamespaceWrapper);
2279 return m_illegalNames;
2298 bool instanceOfObject =
false;
2302 instanceOfObject =
true;
2305 p =
p->getPrototypeOf();
2307 if (!instanceOfObject)
2311 object->setInternalClass(frozen);
2315 if (!frozen->
nameMap.at(
i).isStringOrSymbol())
2317 o = *
object->propertyData(
i);
2337 std::vector<Heap::Object *> stack {
object->d() };
2346 const auto writableBegin = std::begin(writableMembers);
2347 const auto writableEnd = std::end(writableMembers);
2349 while (!stack.empty()) {
2350 object = stack.back();
2365 if (!
key.isStringOrSymbol())
2367 if ((member = *
object->propertyData(
i))) {
2368 stack.push_back(member->d());
2369 if (std::find(writableBegin, writableEnd,
key) == writableEnd) {
2373 locked = locked->changeMember(
key, attributes);
2378 object->setInternalClass(locked->d());
2386 m_startedTimers[timerName] = m_time.
elapsed();
2391 if (!m_startedTimers.
contains(timerName)) {
2392 *wasRunning =
false;
2396 qint64 startedAt = m_startedTimers.
take(timerName);
2397 return m_time.
elapsed() - startedAt;
2411 if (m_extensionData.size() <=
index)
2412 m_extensionData.resize(
index + 1);
2414 if (m_extensionData.at(
index))
2415 delete m_extensionData.at(
index);
2420template<
typename Source>
2424 if (!
QMetaType::view(metaType,
data, QMetaType::fromType<QSequentialIterable>(), &iterable))
2431 element =
QVariant(elementMetaType);
2443 switch (metaType.
id()) {
2444 case QMetaType::Bool:
2445 *
reinterpret_cast<bool*
>(
data) =
value.toBoolean();
2447 case QMetaType::Int:
2448 *
reinterpret_cast<int*
>(
data) =
value.toInt32();
2450 case QMetaType::UInt:
2453 case QMetaType::LongLong:
2456 case QMetaType::ULongLong:
2459 case QMetaType::Double:
2460 *
reinterpret_cast<double*
>(
data) =
value.toNumber();
2462 case QMetaType::QString:
2463 if (
value.isUndefined())
2465 else if (
value.isNull())
2470 case QMetaType::QByteArray:
2474 *
reinterpret_cast<QByteArray*
>(
data) =
string->toQString().toUtf8();
2478 case QMetaType::Float:
2479 *
reinterpret_cast<float*
>(
data) =
value.toNumber();
2481 case QMetaType::Short:
2482 *
reinterpret_cast<short*
>(
data) =
short(
value.toInt32());
2484 case QMetaType::UShort:
2485 *
reinterpret_cast<unsigned short*
>(
data) =
value.toUInt16();
2487 case QMetaType::Char:
2488 *
reinterpret_cast<char*
>(
data) =
char(
value.toInt32());
2490 case QMetaType::UChar:
2491 *
reinterpret_cast<unsigned char*
>(
data) = (
unsigned char)(
value.toInt32());
2493 case QMetaType::SChar:
2494 *
reinterpret_cast<signed char*
>(
data) = (
signed char)(
value.toInt32());
2496 case QMetaType::QChar:
2504 case QMetaType::QDateTime:
2509 case QMetaType::QDate:
2514 case QMetaType::QTime:
2516 *
reinterpret_cast<QTime *
>(
data) =
d->toQDateTime().time();
2519 case QMetaType::QUrl:
2524 *
reinterpret_cast<QUrl *
>(
data) =
d->toQUrl();
2535#if QT_CONFIG(regularexpression)
2536 case QMetaType::QRegularExpression:
2542 case QMetaType::QObjectStar: {
2543 if (
value.isNull()) {
2553 case QMetaType::QStringList: {
2561 case QMetaType::QVariantList: {
2571 case QMetaType::QVariantMap: {
2583 }
else if (
value.isNull()) {
2585 }
else if (
value.isUndefined()) {
2587 }
else if (
value.isBoolean()) {
2589 }
else if (
value.isInteger()) {
2591 }
else if (
value.isDouble()) {
2595 case QMetaType::QJsonValue:
2598 case QMetaType::QJsonObject: {
2602 case QMetaType::QJsonArray: {
2610#if QT_CONFIG(qml_locale)
2611 case QMetaType::QLocale: {
2613 *
reinterpret_cast<QLocale *
>(
data) = *l->d()->locale;
2624 *
reinterpret_cast<int *
>(
data) =
value.toInt32();
2628 if (metaType == QMetaType::fromType<QQmlListReference>()) {
2636 const QMetaType valueType = vtw->type();
2637 if (valueType == metaType)
2638 return vtw->toGadget(
data);
2640 Heap::QQmlValueTypeWrapper *
d = vtw->d();
2641 if (
d->isReference())
2644 if (
void *gadgetPtr =
d->gadgetPtr()) {
2665 if (variantObject) {
2683 *
reinterpret_cast<const void **
>(
data) =
var.
data();
2690 bool canCast =
false;
2693 canCast = (metaType ==
v.metaType());
2699 canCast =
metaObject->cast(qobject) !=
nullptr;
2701 canCast = qobject->qt_metacast(pointedToTypeName);
2707 *
reinterpret_cast<const void **
>(
data)
2708 = *
reinterpret_cast<void *
const *
>(
var.
data());
2710 *
reinterpret_cast<const void **
>(
data) =
var.
data();
2714 proto = proto->getPrototypeOf();
2721 }
else if (
value.isNull() && isPointer) {
2722 *
reinterpret_cast<void* *
>(
data) =
nullptr;
2724 }
else if (metaType == QMetaType::fromType<QJSValue>()) {
2727 }
else if (metaType == QMetaType::fromType<QJSPrimitiveValue>()) {
2730 }
else if (!isPointer) {
2737 if (
result.metaType() == metaType) {
2762 if (
QObject *instance = targetMetaObject->cast(qobject)) {
2774 if (
void *instance = qobject->qt_metacast(
className)) {
2784 if (!
value.isObject())
2793 if (
type == QMetaType::QObjectStar)
2802 return typeWrapper->object();
2818 return ®istrationData()->mutex;
2823 return registrationData()->extensionCount++;
2826#if QT_CONFIG(qml_network)
2829 return engine->qmlEngine()->networkAccessManager();
T loadAcquire() const noexcept
void storeRelease(T newValue) noexcept
qsizetype size() const noexcept
Returns the number of bytes in this byte array.
QList< QByteArray > split(char sep) const
Splits the byte array into subarrays wherever sep occurs, and returns the list of those arrays.
QByteArray chopped(qsizetype len) const
bool startsWith(QByteArrayView bv) const
QByteArray mid(qsizetype index, qsizetype len=-1) const
Returns a byte array containing len bytes from this byte array, starting at position pos.
\inmodule QtCore\reentrant
\inmodule QtCore \reentrant
qint64 elapsed() const noexcept
Returns the number of milliseconds since this QElapsedTimer was last started.
void start() noexcept
Starts this timer.
bool isValid() const noexcept
Returns false if the timer has never been started or invalidated by a call to invalidate().
\inmodule QtCore \reentrant
QDateTime lastModified() const
Returns the date and time when the file was last modified.
T take(const Key &key)
Removes the item with the key from the hash and returns the value associated with it.
bool contains(const Key &key) const noexcept
Returns true if the hash contains an item with the key; otherwise returns false.
T value(const Key &key) const noexcept
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
Container metaContainer() const
The QJSEngine class provides an environment for evaluating JavaScript code.
static void setObjectOwnership(QObject *, ObjectOwnership)
Sets the ownership of object.
The QJSPrimitiveValue class operates on primitive types in JavaScript semantics.
constexpr Type type() const
Returns the type of the QJSPrimitiveValue.
static QJSValue fromReturnedValue(QV4::ReturnedValue d)
static QV4::ExecutionEngine * engine(const QJSValue *jsval)
static QV4::ReturnedValue convertToReturnedValue(QV4::ExecutionEngine *e, const QJSValue &jsval)
static void setValue(QJSValue *jsval, const QV4::Value &v)
The QJSValue class acts as a container for Qt/JavaScript data types.
QJSValue property(const QString &name) const
Returns the value of this QJSValue's property with the given name.
QVariant toVariant() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
QString arg(Args &&...args) const
qsizetype size() const noexcept
const_reference at(qsizetype i) const noexcept
void append(parameter_type t)
iterator insert(const Key &key, const T &value)
const_iterator constBegin() const
const_iterator constEnd() const
void unlock() noexcept
Unlocks this mutex locker.
void relock() noexcept
Relocks an unlocked mutex locker.
The QNetworkAccessManager class allows the application to send network requests and receive replies.
static void registerExtension(QV4::ExecutionEngine *engine)
void init(QV4::ExecutionEngine *)
The QQmlEngine class provides an environment for instantiating QML components.
The QQmlError class encapsulates a QML error.
static QString urlToLocalFileOrQrc(const QString &)
If url is a local file returns a path suitable for passing to QFile.
The QQmlListProperty class allows applications to expose list-like properties of QObject-derived clas...
The QQmlListReference class allows the manipulation of QQmlListProperty properties.
static void registerExtension(QV4::ExecutionEngine *engine)
static QUrl normalize(const QUrl &unNormalizedUrl)
bool isSequentialContainer() const
QMetaSequence listMetaSequence() const
static bool populateValueType(QMetaType targetMetaType, void *target, const QV4::Value &source)
static QVariant createValueType(const QJSValue &, QMetaType)
\inmodule QtCore \reentrant
T * data() const noexcept
Returns the value of the pointer referenced by this object.
void reset(T *other=nullptr) noexcept(noexcept(Cleanup::cleanup(std::declval< T * >())))
Deletes the existing object it is pointing to (if any), and sets its pointer to other.
The QSequentialIterable class is an iterable interface for a container in a QVariant.
const_iterator constBegin() const
QMetaType valueMetaType() const
void addValue(const QVariant &value, Position position=Unspecified)
Adds value to the container, at position, if possible.
const_iterator constEnd() const
bool remove(const T &value)
bool contains(const T &value) const
iterator insert(const T &value)
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
qsizetype size() const
Returns the number of characters in this string.
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
const QChar at(qsizetype i) const
Returns the character at the given index position in the string.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static void yieldCurrentThread()
\inmodule QtCore \reentrant
QString fileName(ComponentFormattingOptions options=FullyDecoded) const
QUrl resolved(const QUrl &relative) const
Returns the result of the merge of this URL with relative.
QString toString(FormattingOptions options=FormattingOptions(PrettyDecoded)) const
Returns a string representation of the URL.
QString toLocalFile() const
Returns the path of this URL formatted as a local file path.
static QV4::CompiledData::CompilationUnit compileModule(bool debugMode, const QString &url, const QString &sourceCode, const QDateTime &sourceTimeStamp, QList< QQmlJS::DiagnosticMessage > *diagnostics)
static QQmlRefPointer< ExecutableCompilationUnit > create()
ManagedType::Data * allocManaged(std::size_t size, Heap::InternalClass *ic)
ObjectType::Data * allocate(Args &&... args)
PersistentValueStorage * m_persistentValues
ManagedType::Data * allocWithStringData(std::size_t unmanagedSize, Arg1 &&arg1)
ManagedType::Data * allocIC()
ObjectType::Data * allocObject(Heap::InternalClass *ic, Args &&... args)
void * data()
Returns a pointer to the contained object as a generic void* that can be written to.
bool convert(QMetaType type)
Casts the variant to the requested type, targetType.
bool isValid() const
Returns true if the storage type of this variant is not QMetaType::UnknownType; otherwise returns fal...
QMap< QString, QVariant > toMap() const
Returns the variant as a QVariantMap if the variant has type() \l QMetaType::QVariantMap.
static auto fromValue(T &&value) noexcept(std::is_nothrow_copy_constructible_v< T > &&Private::CanUseInternalSpace< T >) -> std::enable_if_t< std::conjunction_v< std::is_copy_constructible< T >, std::is_destructible< T > >, QVariant >
QMetaType metaType() const
const void * constData() const
QMap< QString, QString > map
[6]
qDeleteAll(list.begin(), list.end())
QSet< QString >::iterator it
Q_QML_PRIVATE_EXPORT void registerStringLocaleCompare(QV4::ExecutionEngine *engine)
Q_QML_PRIVATE_EXPORT QV4::ReturnedValue wrap(QV4::ExecutionEngine *engine, const QLocale &locale)
Combined button and popup list for selecting options.
\qmltype Particle \inqmlmodule QtQuick.Particles
StackProperties stackProperties()
@ Attr_ReadOnly_ButConfigurable
static const void * symbol()
#define Q_BASIC_ATOMIC_INITIALIZER(a)
Q_CORE_EXPORT char * qstrdup(const char *)
QMap< QString, QVariant > QVariantMap
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction function
DBusConnection const char DBusError * error
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
static AnchorData * createSequence(Graph< AnchorVertex, AnchorData > *graph, AnchorVertex *before, const QList< AnchorVertex * > &vertices, AnchorVertex *after)
QList< QVariant > QVariantList
static ControlElement< T > * ptr(QWidget *widget)
constexpr T qAbs(const T &t)
GLenum GLsizei GLsizei GLint * values
[15]
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLfloat GLfloat GLfloat w
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLsizei GLenum GLenum * types
GLenum GLuint GLenum GLsizei length
GLenum GLenum GLsizei count
GLuint GLsizei const GLchar * message
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLenum GLsizei void GLsizei void * column
GLsizei const GLchar *const * string
[0]
static QString jsStack(QV4::ExecutionEngine *engine)
#define DEFINE_BOOL_CONFIG_OPTION(name, var)
T qmlGetConfigOption(const char *var)
void * qt_add_qmlxmlhttprequest(ExecutionEngine *v4)
void qt_rem_qmlxmlhttprequest(ExecutionEngine *, void *d)
static QList< QVariant > toList(char **buf, int count)
QLatin1StringView QLatin1String
#define QStringLiteral(str)
#define QT_CONFIG(feature)
Q_CORE_EXPORT bool qEnvironmentVariableIsSet(const char *varName) noexcept
Q_CORE_EXPORT int qEnvironmentVariableIntValue(const char *varName, bool *ok=nullptr) noexcept
static DebuggerProgram debugger
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
void qt_add_domexceptions(ExecutionEngine *e)
static char * v4StackTrace(const ExecutionContext *context)
static QObject * qtObjectFromJS(const QV4::Value &value)
Q_QML_EXPORT char * qt_v4StackTraceForEngine(void *executionEngine)
static QV4::ReturnedValue variantMapToJS(QV4::ExecutionEngine *v4, const QVariantMap &vmap)
static void freeze_recursive(QV4::ExecutionEngine *v4, QV4::Object *object)
static QSequentialIterable jsvalueToSequence(const QJSValue &value)
ReturnType convertJSValueToVariantType(const QJSValue &value)
static QVariant toVariant(const QV4::Value &value, QMetaType typeHint, bool createJSValueForObjectsAndSymbols, V4ObjectSet *visitedObjects)
static QtMetaContainerPrivate::QMetaSequenceInterface emptySequenceInterface()
static ExecutionEngine::DiskCacheOptions transFormDiskCache(const char *v)
static QtMetaContainerPrivate::QMetaSequenceInterface sequenceInterface()
Q_QML_EXPORT char * qt_v4StackTrace(void *executionContext)
static bool convertToNativeQObject(const QV4::Value &value, QMetaType targetType, void **result)
static QBasicAtomicInt engineSerial
static QVariant objectToVariant(const QV4::Object *o, V4ObjectSet *visitedObjects=nullptr)
QSet< QV4::Heap::Object * > V4ObjectSet
static QV4::ReturnedValue variantToJS(QV4::ExecutionEngine *v4, const QVariant &value)
bool convertToIterable(QMetaType metaType, void *data, Source *sequence)
ReturnedValue throwTypeError(const FunctionObject *b, const QV4::Value *, const QV4::Value *, int)
static int toInt(const QChar &qc, int R)
void qt_add_sqlexceptions(QV4::ExecutionEngine *engine)
const char className[16]
[1]
if(qFloatDistance(a, b)<(1<< 7))
[0]
QUrl url("example.com")
[constructor-url-reference]
obj metaObject() -> className()
QV4EngineRegistrationData()
static ReturnedValue method_get_species(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static QDate dateTimeToDate(const QDateTime &dateTime)
static constexpr ReturnedValue undefined()
static constexpr ReturnedValue null()
const void * cppStackLimit
IdentifierTable * identifierTable
@ Class_QmlContextWrapper
@ Class_MemberGeneratorFunction
@ Class_ErrorObjectWithMessage
@ Class_GeneratorFunction
@ Class_ConstructorFunction
@ Class_ProxyFunctionObject
@ Class_StrictArgumentsObject
Heap::InternalClass * internalClasses(InternalClassType icType)
Heap::InternalClass * classes[NClasses]
MemoryManager * memoryManager
const void * cppStackBase
CppStackFrame * currentStackFrame
static ReturnedValue method_get_stack(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
Heap::QmlContext * qmlContext() const
FunctionObject * promiseCtor() const
Heap::Object * newSetIteratorObject(Object *o)
static bool metaTypeFromJS(const Value &value, QMetaType type, void *data)
WTF::PageAllocation * gcStack
Object * typeErrorPrototype() const
ExecutionContext * rootContext() const
Symbol * symbol_iterator() const
ReturnedValue throwUnimplemented(const QString &message)
QQmlRefPointer< QQmlContextData > callingQmlContext() const
StackTrace exceptionStackTrace
WTF::PageAllocation * jsStack
Heap::String * newString(const QString &s=QString())
void injectCompiledModule(const QQmlRefPointer< ExecutableCompilationUnit > &moduleUnit)
Object * iteratorPrototype() const
FunctionObject * objectCtor() const
FunctionObject * urlSearchParamsCtor() const
FunctionObject * regExpCtor() const
QV4::Debugging::Debugger * debugger() const
String * id_arguments() const
FunctionObject * booleanCtor() const
QQmlError catchExceptionAsQmlError()
String * id_callee() const
Heap::DateObject * newDateObject(double dateTime)
Object * urlPrototype() const
Heap::PromiseObject * newPromiseObject()
Object * dataViewPrototype() const
ReturnedValue throwRangeError(const Value &value)
Object * stringPrototype() const
FunctionObject * dateCtor() const
String * id_length() const
void setProfiler(Profiling::Profiler *)
Heap::Object * newURIErrorObject(const QString &message)
Object * arrayPrototype() const
String * id_constructor() const
FunctionObject * evalErrorCtor() const
Heap::Object * newNumberObject(double value)
Object * weakSetPrototype() const
ReturnedValue throwError(const Value &value)
ReturnedValue throwReferenceError(const Value &value)
Object * stringIteratorPrototype() const
void markObjects(MarkStack *markStack)
FunctionObject * typedArrayCtors
QV4::ReturnedValue fromVariant(const QVariant &)
void setQmlEngine(QQmlEngine *engine)
@ IntrinsicTypedArrayProto
@ IntrinsicTypedArray_Ctor
Object * variantPrototype() const
static QVariantMap variantMapFromJS(const QV4::Object *o)
Heap::Object * newSyntaxErrorObject(const QString &message, const QString &fileName, int line, int column)
Object * weakMapPrototype() const
Heap::Object * newSymbolObject(const Symbol *symbol)
String * id_toString() const
Heap::Object * newEvalErrorObject(const QString &message)
Object * mapIteratorPrototype() const
Heap::UrlSearchParamsObject * newUrlSearchParamsObject()
String * id_prototype() const
Object * numberPrototype() const
String * id_lastIndex() const
Heap::Object * newObject()
QV4::ReturnedValue global()
static int registerExtension()
int consoleCountHelper(const QString &file, quint16 line, quint16 column)
FunctionObject * urlCtor() const
QML_NEARLY_ALWAYS_INLINE Value * jsAlloca(int nValues)
QIntrusiveList< ExecutableCompilationUnit, &ExecutableCompilationUnit::nextCompilationUnit > compilationUnits
String * id_caller() const
Heap::Object * newMapIteratorObject(Object *o)
FunctionObject * typeErrorCtor() const
String * id_toLocaleString() const
FunctionObject * referenceErrorCtor() const
Object * rangeErrorPrototype() const
ExecutableAllocator * executableAllocator
int safeForAllocLength(qint64 len64)
Object * setPrototype() const
Heap::UrlObject * newUrlObject()
QQmlRefPointer< ExecutableCompilationUnit > compileModule(const QUrl &url)
FunctionObject * arrayBufferCtor() const
Object * forInIteratorPrototype() const
Module moduleForUrl(const QUrl &_url, const ExecutableCompilationUnit *referrer=nullptr) const
Heap::String * newIdentifier(const QString &text)
void initQmlGlobalObject()
String * id_index() const
const QSet< QString > & illegalNames() const
Heap::Object * newBooleanObject(bool b)
static QMutex * registrationMutex()
static QVariant toVariant(const QV4::Value &value, QMetaType typeHint, bool createJSValueForObjectsAndSymbols=true)
Object * uRIErrorPrototype() const
Object * datePrototype() const
EvalFunction * evalFunction() const
FunctionObject * functionCtor() const
FunctionObject * syntaxErrorCtor() const
Promise::ReactionHandler * getPromiseReactionHandler()
ExecutionEngine(QJSEngine *jsEngine=nullptr)
WTF::BumpPointerAllocator * bumperPointerAllocator
String * id_input() const
ExecutableAllocator * regExpAllocator
Object * intrinsicTypedArrayPrototype() const
Object * objectPrototype() const
Symbol * symbol_hasInstance() const
FunctionObject * errorCtor() const
StackTrace stackTrace(int frameLimit=-1) const
ReturnedValue throwURIError(const Value &msg)
FunctionObject * symbolCtor() const
QV4::ReturnedValue metaTypeToJS(QMetaType type, const void *data)
QUrl resolvedUrl(const QString &file)
void setExtensionData(int, Deletable *)
Object * syntaxErrorPrototype() const
RegExpCache * regExpCache
Object * sharedArrayBufferPrototype() const
static QJSPrimitiveValue createPrimitive(const Value &v)
FunctionObject * mapCtor() const
Object * booleanPrototype() const
Object * setIteratorPrototype() const
Heap::Object * newReferenceErrorObject(const QString &message)
void setDebugger(Debugging::Debugger *)
@ Symbol_isConcatSpreadable
Object * symbolPrototype() const
Heap::InternalClass * newClass(Heap::InternalClass *other)
void freezeObject(const QV4::Value &value)
void startTimer(const QString &timerName)
Object * functionPrototype() const
FunctionObject * uRIErrorCtor() const
FunctionObject * generatorFunctionCtor() const
Object * urlSearchParamsPrototype() const
Heap::Object * newForInIteratorObject(Object *o)
Heap::Object * newRangeErrorObject(const QString &message)
FunctionObject * arrayCtor() const
Object * promisePrototype() const
FunctionObject * setCtor() const
qint64 stopTimer(const QString &timerName, bool *wasRunning)
Heap::ArrayObject * newArrayObject(int count=0)
Object * arrayIteratorPrototype() const
FunctionObject * thrower() const
Object * sequencePrototype() const
Heap::Object * newTypeErrorObject(const QString &message)
Object * arrayBufferPrototype() const
FunctionObject * intrinsicTypedArrayCtor() const
Heap::Object * newVariantObject(const QMetaType type, const void *data)
Heap::Object * newStringObject(const String *string)
FunctionObject * rangeErrorCtor() const
FunctionObject * dataViewCtor() const
Object * typedArrayPrototype
QV4::Value * registerNativeModule(const QUrl &url, const QV4::Value &module)
QV4::ReturnedValue fromData(QMetaType type, const void *ptr, Heap::Object *parent=nullptr, int property=-1, uint flags=0)
ReturnedValue throwSyntaxError(const QString &message)
QObject * qmlScopeObject() const
Object * propertyListPrototype() const
DiskCacheOptions diskCacheOptions() const
Object * evalErrorPrototype() const
String * id_valueOf() const
Heap::Object * newArrayIteratorObject(Object *o)
int maxJSStackSize() const
int maxGCStackSize() const
Object * regExpPrototype() const
ReturnedValue catchException(StackTrace *trace=nullptr)
Heap::ArrayBuffer * newArrayBuffer(const QByteArray &array)
FunctionObject * weakSetCtor() const
FunctionObject * weakMapCtor() const
FunctionObject * stringCtor() const
Heap::RegExpObject * newRegExpObject(const QString &pattern, int flags)
ReturnedValue throwTypeError()
MultiplyWrappedQObjectMap * m_multiplyWrappedQObjects
FunctionObject * numberCtor() const
FunctionObject * sharedArrayBufferCtor() const
Heap::Object * newErrorObject(const Value &value)
Object * mapPrototype() const
Module loadModule(const QUrl &_url, const ExecutableCompilationUnit *referrer=nullptr)
Object * errorPrototype() const
Heap::InternalClass * newInternalClass(const VTable *vtable, Object *prototype)
QV4::Profiling::Profiler * profiler() const
ExecutionContext * currentContext() const
void callInContext(QV4::Function *function, QObject *self, QV4::ExecutionContext *ctxt, int argc, void **args, QMetaType *types)
Object * generatorPrototype() const
Object * referenceErrorPrototype() const
void lockObject(const QV4::Value &value)
static Heap::FunctionObject * createBuiltinFunction(ExecutionEngine *engine, StringOrSymbol *nameOrSymbol, VTable::Call code, int argumentCount)
ReturnedValue name() const
ReturnedValue callAsConstructor(const JSCallData &data) const
static void init(Object *globalObject, QJSEngine::Extensions extensions)
static ReturnedValue method_unescape(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_parseInt(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_parseFloat(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_isNaN(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
isNaN [15.1.2.4]
static ReturnedValue method_isFinite(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
isFinite [15.1.2.5]
static ReturnedValue method_encodeURIComponent(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
encodeURIComponent [15.1.3.4]
static ReturnedValue method_decodeURI(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
decodeURI [15.1.3.1]
static ReturnedValue method_decodeURIComponent(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
decodeURIComponent [15.1.3.2]
static ReturnedValue method_encodeURI(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
encodeURI [15.1.3.3]
static ReturnedValue method_escape(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
ReturnedValue asReturnedValue() const
Pointer< InternalClass *, 0 > internalClass
void init(ExecutionEngine *engine)
static void addMember(QV4::Object *object, PropertyKey id, PropertyAttributes data, InternalClassEntry *entry)
SharedInternalClassData< PropertyKey > nameMap
Q_REQUIRED_RESULT InternalClass * changePrototype(Heap::Object *proto)
Q_REQUIRED_RESULT InternalClass * changeVTable(const VTable *vt)
void markObjects(MarkStack *markStack)
static ReturnedValue fromJsonValue(ExecutionEngine *engine, const QJsonValue &value)
static ReturnedValue fromJsonObject(ExecutionEngine *engine, const QJsonObject &object)
static ReturnedValue fromJsonArray(ExecutionEngine *engine, const QJsonArray &array)
static QJsonObject toJsonObject(const QV4::Object *o)
static QJsonArray toJsonArray(const QV4::ArrayObject *a)
static QJsonValue toJsonValue(const QV4::Value &value)
Heap::InternalClass * internalClass() const
ExecutionEngine * engine() const
void defineDefaultProperty(StringOrSymbol *name, const Value &value, PropertyAttributes attributes=Attr_Data|Attr_NotEnumerable)
const VTable * vtable() const
void defineReadonlyProperty(const QString &name, const Value &value)
void insertMember(StringOrSymbol *s, const Value &v, PropertyAttributes attributes=Attr_Data)
static void free(Value *v)
void setConfigurable(bool b)
static void initializeBindings(ExecutionEngine *engine)
static ReturnedValue wrap(ExecutionEngine *engine, QObject *object)
static ReturnedValue wrapConst(ExecutionEngine *engine, QObject *object)
static ReturnedValue create(ExecutionEngine *engine, const void *data, const QMetaObject *metaObject, QMetaType type, Heap::Object *object, int property, Heap::ReferenceObject::Flags flags)
static V4_NEEDS_DESTROY ReturnedValue create(ExecutionEngine *engine, QObject *object, int propId, QMetaType propType)
static Heap::RegExp * create(ExecutionEngine *engine, const QString &pattern, uint flags=CompiledData::RegExp::RegExp_NoFlags)
static ReturnedValue newSequence(QV4::ExecutionEngine *engine, QMetaType type, QMetaSequence metaSequence, const void *data, Heap::Object *object, int propertyIndex, Heap::ReferenceObject::Flags flags)
static QVariant toVariant(const Sequence *object)
static ReturnedValue fromData(QV4::ExecutionEngine *engine, QMetaType type, QMetaSequence metaSequence, const void *data)
constexpr ReturnedValue asReturnedValue() const
PropertyKey propertyKey() const
static V4_NEEDS_DESTROY Heap::Symbol * create(ExecutionEngine *e, const QString &s)
static constexpr Value fromInt32(int i)
QML_NEARLY_ALWAYS_INLINE String * stringValue() const
static constexpr Value undefinedValue()
static Value fromDouble(double d)
QString toQStringNoThrow() const
static constexpr Value emptyValue()
uchar data[MaxInternalSize]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent