29 bool protoSet =
false;
31 protoSet =
a->setProtoFromNewTarget(newTarget);
32 if (!protoSet && weakMap) {
33 a->setPrototypeOf(
scope.engine->weakMapPrototype());
34 scope.engine->memoryManager->registerWeakMap(
a->d());
36 a->d()->isWeakMap = weakMap;
44 return scope.engine->throwTypeError();
47 if (
scope.hasException())
56 if (
scope.hasException())
58 if (
done->toBoolean())
59 return a->asReturnedValue();
62 scope.engine->throwTypeError();
67 if (
scope.hasException())
70 if (
scope.hasException())
74 if (
scope.hasException())
81 return a->asReturnedValue();
87 return construct(
f, argv, argc, newTarget,
true);
99 return construct(
f, argv, argc, newTarget,
false);
108 defineDefaultProperty(
engine->id_constructor(), (
o = ctor));
110 defineDefaultProperty(
QStringLiteral(
"delete"), method_delete, 1);
116 defineReadonlyConfigurableProperty(
engine->symbol_toStringTag(),
val);
127 defineDefaultProperty(
engine->id_constructor(), (
o = ctor));
130 defineDefaultProperty(
QStringLiteral(
"delete"), method_delete, 1);
131 defineDefaultProperty(
QStringLiteral(
"forEach"), method_forEach, 1);
136 defineAccessorProperty(
QStringLiteral(
"size"), method_get_size,
nullptr);
137 defineDefaultProperty(
QStringLiteral(
"values"), method_values, 0);
143 defineDefaultProperty(
engine->symbol_iterator(), entriesFn);
146 defineReadonlyConfigurableProperty(
engine->symbol_toStringTag(),
val);
163 esTable->removeUnmarkedKeys();
170 Object::markObjects(that, markStack);
177 if (!that || !that->d()->isWeakMap)
179 if (!argc || !argv[0].isObject())
182 return Encode(that->d()->esTable->remove(argv[0]));
190 if (!that || !that->d()->isWeakMap)
192 if (!argc || !argv[0].isObject())
195 return that->d()->esTable->get(argv[0]);
202 if (!that || !that->d()->isWeakMap)
204 if (!argc || !argv[0].isObject())
207 return Encode(that->d()->esTable->has(argv[0]));
214 if ((!that || !that->d()->isWeakMap) ||
227 if (!that || that->d()->isWeakMap)
230 that->d()->esTable->clear();
238 if (!that || that->d()->isWeakMap)
248 if (!that || that->d()->isWeakMap)
260 if (!that || that->d()->isWeakMap)
273 for (
uint i = 0;
i < that->d()->esTable->size(); ++
i) {
286 if (!that || that->d()->isWeakMap)
296 if (!that || that->d()->isWeakMap)
306 if (!that || that->d()->isWeakMap)
318 if (!that || that->d()->isWeakMap)
329 if (!that || that->d()->isWeakMap)
332 return Encode(that->d()->esTable->size());
339 if (!that || that->d()->isWeakMap)
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void markObjects(MarkStack *s, bool isWeakMap)
QList< QVariant > arguments
\qmltype Particle \inqmlmodule QtQuick.Particles
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter * iter
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
[7]
#define QStringLiteral(str)
#define CHECK_EXCEPTION()
#define DEFINE_OBJECT_VTABLE(classname)
static constexpr ReturnedValue undefined()
Heap::Object * newMapIteratorObject(Object *o)
Heap::String * newIdentifier(const QString &text)
ReturnedValue throwTypeError()
static Heap::FunctionObject * createBuiltinFunction(ExecutionEngine *engine, StringOrSymbol *nameOrSymbol, VTable::Call code, int argumentCount)
Heap::ExecutionContext * scope() const
void init(QV4::ExecutionContext *scope)
void removeUnmarkedKeys()
static void markObjects(Heap::Base *that, MarkStack *markStack)
void init(QV4::ExecutionContext *scope)
static ReturnedValue method_keys(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_get(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_delete(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_set(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_values(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
void init(ExecutionEngine *engine, Object *ctor)
static ReturnedValue method_clear(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_entries(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_forEach(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_get_size(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_has(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
void defineReadonlyConfigurableProperty(const QString &name, const Value &value)
void defineReadonlyProperty(const QString &name, const Value &value)
static PropertyKey fromArrayIndex(uint idx)
static ReturnedValue call(ExecutionEngine *, const Value &, int)
static ReturnedValue call(ExecutionEngine *, const Value &, const Value &)
static ReturnedValue call(ExecutionEngine *, const Value &, Value *)
Value * alloc(qint64 nValues) const =delete
QML_NEARLY_ALWAYS_INLINE ReturnedValue asReturnedValue() const
bool isNullOrUndefined() const
static constexpr VTable::CallAsConstructor virtualCallAsConstructor
static constexpr VTable::Call virtualCall
static constexpr Value fromInt32(int i)
static constexpr Value undefinedValue()
static ReturnedValue construct(const FunctionObject *f, const Value *argv, int argc, const Value *, bool weakMap)
static ReturnedValue method_get(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_has(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_set(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_delete(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
void init(ExecutionEngine *engine, Object *ctor)