9#include <QtCore/qatomic.h>
27 return v.integerValue();
28 return QJSNumberCoercion::toInteger(
v.doubleValue());
35 return v.integerValue();
36 return v.doubleValue();
58 return static_cast<T
>(
n);
65 if (
value.isInteger())
68 double d =
value.doubleValue();
70 if (
d <= 0 || std::isnan(
d))
74 double f = std::floor(
d);
90 return static_cast<float>(
d);
107 *
reinterpret_cast<T *
>(
data) = valueToType<T>(
value);
113 T
value = valueToType<T>(
v);
122 T
value = valueToType<T>(
v);
131 T
value = valueToType<T>(
v);
140 T
value = valueToType<T>(
v);
149 T
value = valueToType<T>(
v);
158 T
value = valueToType<T>(
v);
167 T
value = valueToType<T>(
v);
186 T
value = valueToType<T>(
v);
200 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr },
214 { ::atomicAdd<T>, ::atomicAnd<T>, ::atomicExchange<T>, ::atomicOr<T>, ::atomicSub<T>, ::atomicXor<T> },
215 ::atomicCompareExchange<T>,
222#ifdef Q_ATOMIC_INT8_IS_SUPPORTED
223 TypedArrayOperations::createWithAtomics<qint8>(
"Int8Array"),
224 TypedArrayOperations::createWithAtomics<quint8>(
"Uint8Array"),
226 TypedArrayOperations::create<qint8>(
"Int8Array"),
227 TypedArrayOperations::create<quint8>(
"Uint8Array"),
229 TypedArrayOperations::createWithAtomics<qint16>(
"Int16Array"),
230 TypedArrayOperations::createWithAtomics<quint16>(
"Uint16Array"),
231 TypedArrayOperations::createWithAtomics<qint32>(
"Int32Array"),
232 TypedArrayOperations::createWithAtomics<quint32>(
"Uint32Array"),
233 TypedArrayOperations::create<ClampedUInt8>(
"Uint8ClampedArray"),
234 TypedArrayOperations::create<float>(
"Float32Array"),
235 TypedArrayOperations::create<double>(
"Float64Array")
255 a->setPrototypeOf(
o);
261 const double l = argc ? argv[0].
toInteger() : 0;
262 if (
scope.hasException())
264 if (l < 0 || l > std::numeric_limits<int>::max())
271 if (byteLength > std::numeric_limits<uint>::max())
275 if (
scope.hasException())
280 array->d()->byteLength = byteLength;
281 array->d()->byteOffset = 0;
284 return array.asReturnedValue();
291 return scope.engine->throwTypeError();
292 uint srcElementSize = typedArray->bytesPerElement();
294 uint byteLength = typedArray->byteLength();
295 uint destByteLength = byteLength*destElementSize/srcElementSize;
298 if (
scope.hasException())
302 array->d()->buffer.set(
scope.engine, newBuffer->d());
303 array->d()->byteLength = destByteLength;
304 array->d()->byteOffset = 0;
306 const char *
src =
buffer->constArrayData() + typedArray->byteOffset();
307 char *dest = newBuffer->arrayData();
310 if (srcElementSize == destElementSize) {
311 memcpy(dest,
src, byteLength);
314 uint l = typedArray->length();
325 return array.asReturnedValue();
331 double dbyteOffset = argc > 1 ? argv[1].
toInteger() : 0;
333 if (
buffer->hasDetachedArrayData())
334 return scope.engine->throwTypeError();
336 uint byteOffset = (
uint)dbyteOffset;
338 if (dbyteOffset < 0 || (byteOffset % elementSize) || dbyteOffset >
buffer->arrayDataLength())
339 return scope.engine->throwRangeError(
QStringLiteral(
"new TypedArray: invalid byteOffset"));
343 byteLength =
buffer->arrayDataLength() - byteOffset;
344 if (
buffer->arrayDataLength() < byteOffset || byteLength % elementSize)
348 if (
scope.hasException())
350 if (
buffer->hasDetachedArrayData())
351 return scope.engine->throwTypeError();
353 if (
buffer->arrayDataLength() - byteOffset < l)
355 byteLength = (
uint)l;
360 array->d()->byteLength = byteLength;
361 array->d()->byteOffset = byteOffset;
364 return array.asReturnedValue();
371 if (
scope.hasException())
372 return scope.engine->throwTypeError();
376 if (
qMulOverflow(
size_t(l), size_t(elementSize), &bufferSize))
377 return scope.engine->throwRangeError(
QLatin1String(
"new TypedArray: invalid length"));
379 if (
scope.hasException())
383 array->d()->buffer.set(
scope.engine, newBuffer->d());
384 array->d()->byteLength = l * elementSize;
385 array->d()->byteOffset = 0;
388 char *
b = newBuffer->arrayData();
392 val =
val->convertedToNumber();
393 if (
scope.hasException())
396 if (
scope.hasException())
403 return array.asReturnedValue();
408 return f->engine()->throwTypeError(
QStringLiteral(
"calling a TypedArray constructor without new is invalid"));
411void Heap::TypedArray::init(
Type t)
415 arrayType =
static_cast<int>(
t);
422 return e->memoryManager->allocObject<
TypedArray>(ic->d(),
t);
427 const bool isArrayIndex =
id.isArrayIndex();
428 if (!isArrayIndex && !
id.isCanonicalNumericIndexString())
433 if (
a->hasDetachedArrayData())
436 if (!isArrayIndex ||
id.asArrayIndex() >=
a->length()) {
438 *hasProperty =
false;
442 uint bytesPerElement =
a->bytesPerElement();
443 uint byteOffset =
a->byteOffset() +
id.asArrayIndex() * bytesPerElement;
444 Q_ASSERT(byteOffset + bytesPerElement <= a->arrayDataLength());
448 return a->d()->type->read(
a->constArrayData() + byteOffset);
453 const bool isArrayIndex =
id.isArrayIndex();
454 if (!isArrayIndex && !
id.isCanonicalNumericIndexString())
458 if (
a->hasDetachedArrayData()) {
462 return isArrayIndex &&
id.asArrayIndex() <
a->length();
467 if (!
id.isArrayIndex() && !
id.isCanonicalNumericIndexString())
470 bool hasProperty =
false;
479 const bool isArrayIndex =
id.isArrayIndex();
480 if (!isArrayIndex && !
id.isCanonicalNumericIndexString())
489 if (
a->hasDetachedArrayData())
499 uint bytesPerElement =
a->bytesPerElement();
500 uint byteOffset =
a->byteOffset() +
index * bytesPerElement;
501 Q_ASSERT(byteOffset + bytesPerElement <= a->arrayDataLength());
506 a->d()->type->write(
a->arrayData() + byteOffset,
v);
512 if (!
id.isArrayIndex()) {
513 return !
id.isCanonicalNumericIndexString()
522 if (
attrs.hasConfigurable() &&
attrs.isConfigurable())
524 if (
attrs.hasEnumerable() && !
attrs.isEnumerable())
526 if (
attrs.hasWritable() && !
attrs.isWritable())
528 if (!
p->value.isEmpty()) {
532 if (
engine->hasException ||
a->hasDetachedArrayData())
533 return engine->throwTypeError();
534 uint bytesPerElement =
a->bytesPerElement();
535 uint byteOffset =
a->byteOffset() +
index * bytesPerElement;
536 Q_ASSERT(byteOffset + bytesPerElement <= a->arrayDataLength());
537 a->d()->type->write(
a->arrayData() + byteOffset,
v);
552 if (arrayIndex < a->
length()) {
557 bool hasProperty =
false;
564 arrayIndex = UINT_MAX;
596 return v->d()->buffer->asReturnedValue();
606 if (
v->hasDetachedArrayData())
609 return Encode(
v->byteLength());
619 if (
v->hasDetachedArrayData())
622 return Encode(
v->byteOffset());
632 if (
v->hasDetachedArrayData())
642 if (!instance || instance->hasDetachedArrayData())
648 const double len = instance->length();
653 const double start = (argc > 1)
661 const double fin =
end < 0
662 ? std::max(
len +
end, 0.0)
679 int elementSize = instance->bytesPerElement();
680 char *
data = instance->arrayData() + instance->byteOffset();
681 memmove(
data + to * elementSize,
data + from * elementSize,
count * elementSize);
691 if (!
v ||
v->hasDetachedArrayData())
703 if (!
v ||
v->hasDetachedArrayData())
716 const char *
data =
v->constArrayData();
717 uint bytesPerElement =
v->bytesPerElement();
718 uint byteOffset =
v->byteOffset();
722 if (
v->hasDetachedArrayData())
725 arguments[0] =
v->d()->type->read(
data + byteOffset + k * bytesPerElement);
740 if (!
v ||
v->hasDetachedArrayData())
745 double relativeStart = argc > 1 ? argv[1].
toInteger() : 0.;
746 double relativeEnd =
len;
753 if (relativeStart < 0) {
754 k =
static_cast<uint>(std::max(
len+relativeStart, 0.));
756 k =
static_cast<uint>(std::min(relativeStart, dlen));
759 if (relativeEnd < 0) {
760 fin =
static_cast<uint>(std::max(
len + relativeEnd, 0.));
762 fin =
static_cast<uint>(std::min(relativeEnd, dlen));
765 double val = argc ? argv[0].
toNumber() : std::numeric_limits<double>::quiet_NaN();
770 char *
data =
v->arrayData();
771 uint bytesPerElement =
v->bytesPerElement();
772 uint byteOffset =
v->byteOffset();
775 v->d()->type->write(
data + byteOffset + k * bytesPerElement,
value);
779 return v.asReturnedValue();
793 if (!
a ||
a->hasDetachedArrayData() ||
a->length() <
len) {
804 if (!instance || instance->hasDetachedArrayData())
819 for (
uint k = 0; k <
len; ++k) {
820 if (instance->hasDetachedArrayData())
823 arguments[0] = instance->get(k, &exists);
845 return a->asReturnedValue();
852 if (!
v ||
v->hasDetachedArrayData())
866 for (
uint k = 0; k <
len; ++k) {
867 if (
v->hasDetachedArrayData())
888 if (!
v ||
v->hasDetachedArrayData())
902 for (
uint k = 0; k <
len; ++k) {
903 if (
v->hasDetachedArrayData())
924 if (!
v ||
v->hasDetachedArrayData())
936 for (
uint k = 0; k <
len; ++k) {
937 if (
v->hasDetachedArrayData())
956 if (!
v ||
v->hasDetachedArrayData())
981 if (
val->sameValueZero(argv[0])) {
994 if (!
v ||
v->hasDetachedArrayData())
1011 fromIndex = (
uint)
f;
1014 if (
v->isStringObject()) {
1016 for (
uint k = fromIndex; k <
len; ++k) {
1018 value =
v->get(k, &exists);
1040 Scope scope(functionObject);
1042 if (!typedArray || typedArray->hasDetachedArrayData())
1060 if (!
value->isNullOrUndefined())
1070 if (!
value->isNullOrUndefined())
1081 if (!
v ||
v->hasDetachedArrayData())
1094 if (!instance || instance->hasDetachedArrayData())
1097 uint len = instance->length();
1105 searchValue = argv[0];
1119 fromIndex = (
uint)
f + 1;
1123 for (
uint k = fromIndex; k > 0;) {
1126 value = instance->get(k, &exists);
1137 if (!instance || instance->hasDetachedArrayData())
1140 uint len = instance->length();
1155 for (
uint k = 0; k <
len; ++k) {
1156 if (instance->hasDetachedArrayData())
1166 return a->asReturnedValue();
1173 if (!instance || instance->hasDetachedArrayData())
1176 uint len = instance->length();
1189 bool kPresent =
false;
1190 while (k <
len && !kPresent) {
1191 v = instance->get(k, &kPresent);
1203 if (instance->hasDetachedArrayData())
1206 v = instance->get(k, &kPresent);
1224 if (!instance || instance->hasDetachedArrayData())
1227 uint len = instance->length();
1245 bool kPresent =
false;
1246 while (k > 0 && !kPresent) {
1247 v = instance->get(k - 1, &kPresent);
1259 if (instance->hasDetachedArrayData())
1262 v = instance->get(k - 1, &kPresent);
1280 if (!instance || instance->hasDetachedArrayData())
1285 int lo = 0, hi =
length - 1;
1289 for (; lo < hi; ++lo, --hi) {
1290 bool loExists, hiExists;
1291 lval = instance->get(lo, &loExists);
1292 hval = instance->get(hi, &hiExists);
1295 ok = instance->put(lo, hval);
1297 ok = instance->put(hi, lval);
1307 if (!instance || instance->hasDetachedArrayData())
1310 uint len = instance->length();
1320 for (
uint k = 0; k <
len; ++k) {
1321 if (instance->hasDetachedArrayData())
1324 arguments[0] = instance->get(k, &exists);
1343 if (!
v ||
v->hasDetachedArrayData())
1359 double doffset = argc >= 2 ? argv[1].
toInteger() : 0;
1365 if (doffset < 0 || doffset >= UINT_MAX)
1368 uint elementSize =
a->bytesPerElement();
1371 if (!srcTypedArray) {
1382 const uint aLength =
a->length();
1387 if (
buffer->hasDetachedArrayData())
1389 char *
b =
buffer->arrayData() +
a->byteOffset() +
offset*elementSize;
1395 val =
val->convertedToNumber();
1398 a->d()->type->write(
b,
val);
1409 if (!srcBuffer || srcBuffer->hasDetachedArrayData())
1412 uint l = srcTypedArray->length();
1414 const uint aLength =
a->length();
1418 char *dest =
buffer->arrayData() +
a->byteOffset() +
offset*elementSize;
1419 const char *
src = srcBuffer->d()->constArrayData() + srcTypedArray->byteOffset();
1420 if (srcTypedArray->d()->type ==
a->d()->type) {
1422 memmove(dest,
src, srcTypedArray->byteLength());
1426 char *srcCopy =
nullptr;
1427 if (
buffer->d() == srcBuffer->d()) {
1429 srcCopy =
new char[srcTypedArray->byteLength()];
1430 memcpy(srcCopy,
src, srcTypedArray->byteLength());
1435 uint srcElementSize = srcTypedArray->bytesPerElement();
1438 for (
uint i = 0;
i < l; ++
i) {
1454 if (!instance || instance->hasDetachedArrayData())
1457 uint len = instance->length();
1486 if (instance->hasDetachedArrayData())
1488 v = instance->get(
i);
1489 if (
a->hasDetachedArrayData())
1494 return a->asReturnedValue();
1499 Scope scope(builtin);
1508 int len =
a->length();
1509 double b = argc > 0 ? argv[0].
toInteger() : 0;
1534 a = constructor->callAsConstructor(
arguments, 3);
1535 if (!
a ||
a->hasDetachedArrayData())
1537 return a->asReturnedValue();
1544 if (!instance || instance->hasDetachedArrayData())
1547 uint len = instance->length();
1558 for (
uint k = 0; k <
len; ++k) {
1559 if (instance->hasDetachedArrayData())
1564 v = instance->get(k);
1574 v =
function->call(valueAsObject,
nullptr, 0);
1582 R +=
s->toQString();
1601 if (
a->hasDetachedArrayData())
1613 return scope.engine->throwTypeError();
1617 if (
scope.hasException())
1620 return scope.engine->throwTypeError();
1623 if (
a->length() <
static_cast<uint>(
len))
1624 return scope.engine->throwTypeError();
1626 for (
int k = 0; k <
len; ++k) {
1636 bool usingIterator =
false;
1639 Value *mapArguments =
nullptr;
1644 mapArguments =
scope.alloc(2);
1652 if (!
it->isNullOrUndefined()) {
1655 return scope.engine->throwTypeError();
1656 usingIterator =
true;
1666 if (usingIterator) {
1670 qint64 iterableLength = 0;
1676 if (!lengthIterator) {
1677 return scope.engine->throwTypeError();
1682 if (iterableLength > (
static_cast<qint64>(1) << 53) - 1) {
1689 if (
scope.hasException())
1691 if (
done->toBoolean()) {
1700 return scope.engine->throwTypeError();
1705 return scope.engine->throwTypeError();
1715 return scope.engine->throwTypeError();
1720 for (
qint64 k = 0; k < iterableLength; ++k) {
1722 if (
scope.hasException())
1726 mapArguments[0] = *nextValue;
1728 mappedValue = mapfn->call(thisArg, mapArguments, 2);
1729 if (
scope.hasException())
1732 mappedValue = *nextValue;
1735 a->put(k, mappedValue);
1736 if (
scope.hasException())
1739 return a.asReturnedValue();
1746 int len = arrayLike->getLength();
1751 return scope.engine->throwTypeError();
1760 return scope.engine->throwTypeError();
1764 for (
int k = 0; k <
len; ++k) {
1765 kValue = arrayLike->get(k);
1769 mapArguments[0] = kValue;
1771 mappedValue = mapfn->call(thisArg, mapArguments, 2);
1774 mappedValue = kValue;
1777 a->put(k, mappedValue);
1780 return a.asReturnedValue();
\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...
QSet< QString >::iterator it
QList< QVariant > arguments
\qmltype Particle \inqmlmodule QtQuick.Particles
Scoped< FunctionObject > ScopedFunctionObject
static QV4::ReturnedValue method_get_length(const FunctionObject *b, const Value *thisObject, const Value *, int)
#define Q_STATIC_ASSERT(Condition)
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction function
DBusConnection const char DBusError * error
static struct AttrInfo attrs[]
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
constexpr const T & qMin(const T &a, const T &b)
constexpr const T & qBound(const T &min, const T &val, const T &max)
constexpr const T & qMax(const T &a, const T &b)
std::enable_if_t< std::is_unsigned_v< T >||std::is_signed_v< T >, bool > qMulOverflow(T v1, T v2, T *r)
GLenum GLsizei GLsizei GLint * values
[15]
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLenum GLsizei length
GLenum GLenum GLsizei count
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLintptr offset
QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator begin(const QRegularExpressionMatchIterator &iterator)
QLatin1StringView QLatin1String
#define QStringLiteral(str)
#define THROW_TYPE_ERROR()
#define CHECK_EXCEPTION()
#define RETURN_UNDEFINED()
ReturnedValue atomicAdd(char *data, Value v)
static TypedArray * typedArraySpeciesCreate(Scope &scope, const TypedArray *instance, uint len)
ReturnedValue atomicExchange(char *data, Value v)
ReturnedValue atomicCompareExchange(char *data, Value expected, Value v)
static double toDouble(Value v)
ReturnedValue atomicXor(char *data, Value v)
ReturnedValue typeToValue(T t)
const TypedArrayOperations operations[NTypedArrayTypes]
void write(char *data, Value value)
T valueToType(Value value)
ReturnedValue read(const char *data)
ReturnedValue atomicStore(char *data, Value v)
static bool validateTypedArray(const Object *o)
ReturnedValue atomicLoad(char *data)
ReturnedValue atomicSub(char *data, Value v)
ReturnedValue atomicAnd(char *data, Value v)
static int toInt32(Value v)
ReturnedValue atomicOr(char *data, Value v)
#define DEFINE_OBJECT_VTABLE(classname)
gzip write("uncompressed data")
static T fetchAndOrOrdered(std::atomic< T > &_q_value, typename QAtomicAdditiveType< T >::AdditiveT valueToAdd) noexcept
static T fetchAndSubOrdered(std::atomic< T > &_q_value, typename QAtomicAdditiveType< T >::AdditiveT valueToAdd) noexcept
static bool testAndSetOrdered(std::atomic< T > &_q_value, T expectedValue, T newValue, T *currentValue=nullptr) noexcept
static T fetchAndAddOrdered(std::atomic< T > &_q_value, typename QAtomicAdditiveType< T >::AdditiveT valueToAdd) noexcept
static T fetchAndStoreOrdered(std::atomic< T > &_q_value, T newValue) noexcept
static T fetchAndXorOrdered(std::atomic< T > &_q_value, typename QAtomicAdditiveType< T >::AdditiveT valueToAdd) noexcept
static T loadRelaxed(const std::atomic< T > &_q_value) noexcept
static void storeRelaxed(std::atomic< T > &_q_value, T newValue) noexcept
static T fetchAndAndOrdered(std::atomic< T > &_q_value, typename QAtomicAdditiveType< T >::AdditiveT valueToAdd) noexcept
static constexpr ReturnedValue undefined()
Symbol * symbol_iterator() const
Heap::String * newString(const QString &s=QString())
ReturnedValue throwRangeError(const Value &value)
String * id_length() const
Object * arrayPrototype() const
String * id_constructor() const
FunctionObject * typedArrayCtors
String * id_toString() const
String * id_prototype() const
String * id_toLocaleString() const
Symbol * symbol_toStringTag() const
Heap::String * newIdentifier(const QString &text)
Object * intrinsicTypedArrayPrototype() const
FunctionObject * intrinsicTypedArrayCtor() const
Heap::Object * newArrayIteratorObject(Object *o)
ReturnedValue throwTypeError()
bool isConstructor() const
static Heap::FunctionObject * createBuiltinFunction(ExecutionEngine *engine, StringOrSymbol *nameOrSymbol, VTable::Call code, int argumentCount)
ReturnedValue protoProperty() const
ReturnedValue call(const JSCallData &data) const
ReturnedValue callAsConstructor(const JSCallData &data) const
Heap::ExecutionContext * scope() const
ReturnedValue asReturnedValue() const
void init(QV4::ExecutionContext *scope, TypedArray::Type t)
void init(TypedArray::Type t)
static ReturnedValue method_of(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_from(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_find(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_filter(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_lastIndexOf(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_get_buffer(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_get_length(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_keys(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_reverse(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_reduce(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_includes(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_map(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_slice(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_reduceRight(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_findIndex(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_indexOf(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_join(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_some(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_get_byteLength(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_get_byteOffset(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_get_toStringTag(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_subarray(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_toLocaleString(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_copyWithin(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_values(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_every(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_fill(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
void init(ExecutionEngine *engine, IntrinsicTypedArrayCtor *ctor)
ExecutionEngine * engine() const
PropertyKey next(const Object *o, Property *pd=nullptr, PropertyAttributes *attrs=nullptr) override
void defineDefaultProperty(StringOrSymbol *name, const Value &value, PropertyAttributes attributes=Attr_Data|Attr_NotEnumerable)
void defineAccessorProperty(const QString &name, VTable::Call getter, VTable::Call setter)
ArrayData::Type arrayType() const
const FunctionObject * speciesConstructor(Scope &scope, const FunctionObject *defaultConstructor) const
void defineReadonlyConfigurableProperty(const QString &name, const Value &value)
bool setPrototypeOf(const Object *p)
void defineReadonlyProperty(const QString &name, const Value &value)
ReturnedValue get(StringOrSymbol *name, bool *hasProperty=nullptr, const Value *receiver=nullptr) const
static PropertyKey fromArrayIndex(uint idx)
static Bool strictEqual(const Value &x, const Value &y)
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
bool hasException() const
QML_NEARLY_ALWAYS_INLINE ReturnedValue asReturnedValue() const
constexpr ReturnedValue asReturnedValue() const
QV4_NEARLY_ALWAYS_INLINE constexpr quint32 value() const
QV4_NEARLY_ALWAYS_INLINE constexpr void setRawValue(quint64 raw)
PropertyKey toPropertyKey() const
static constexpr TypedArrayOperations create(const char *name)
ReturnedValue(* Read)(const char *data)
void(* Write)(char *data, Value value)
static constexpr TypedArrayOperations createWithAtomics(const char *name)
static Heap::TypedArray * create(QV4::ExecutionEngine *e, Heap::TypedArray::Type t)
Heap::TypedArray::Type arrayType() const noexcept
static constexpr VTable::DefineOwnProperty virtualDefineOwnProperty
static constexpr VTable::OwnPropertyKeys virtualOwnPropertyKeys
static constexpr VTable::GetOwnProperty virtualGetOwnProperty
static constexpr VTable::CallAsConstructor virtualCallAsConstructor
static constexpr VTable::Call virtualCall
static constexpr VTable::Get virtualGet
static constexpr VTable::HasProperty virtualHasProperty
static constexpr VTable::Put virtualPut
static constexpr Value fromInt32(int i)
bool isFunctionObject() const
Heap::String * toString(ExecutionEngine *e) const
static constexpr Value fromBoolean(bool b)
static constexpr Value undefinedValue()
static Value fromDouble(double d)
static constexpr Value fromReturnedValue(ReturnedValue val)
QML_NEARLY_ALWAYS_INLINE Value::HeapBasePtr heapObject() const
QString toQStringNoThrow() const
Heap::Object * toObject(ExecutionEngine *e) const
~TypedArrayOwnPropertyKeyIterator() override=default
PropertyKey next(const Object *o, Property *pd=nullptr, PropertyAttributes *attrs=nullptr) override