aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4sequenceobject.cpp
blob: f23d83295359b356c142526cf50f0b6bbfb17533 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#include <QtCore/qsequentialiterable.h>

#include "qv4sequenceobject_p.h"

#include <private/qv4functionobject_p.h>
#include <private/qv4arrayobject_p.h>
#include <private/qqmlengine_p.h>
#include <private/qv4scopedvalue_p.h>
#include <private/qv4jscall_p.h>
#include "qv4runtime_p.h"
#include "qv4objectiterator_p.h"
#include <private/qqmlmetatype_p.h>
#include <private/qqmltype_p_p.h>

#include <algorithm>

QT_BEGIN_NAMESPACE

namespace QV4 {

DEFINE_OBJECT_VTABLE(Sequence);

static const QMetaSequence *metaSequence(const Heap::Sequence *p)
{
    return p->typePrivate->extraData.ld;
}

template<typename Compare>
void sortSequence(Sequence *sequence, const Compare &compare)
{
    const auto *p = sequence->d();
    const auto *m = metaSequence(p);

    QSequentialIterable iterable(*m, p->typePrivate->listId, p->container);
    if (iterable.canRandomAccessIterate()) {
        std::sort(QSequentialIterable::RandomAccessIterator(iterable.mutableBegin()),
                  QSequentialIterable::RandomAccessIterator(iterable.mutableEnd()),
                  compare);
    } else if (iterable.canReverseIterate()) {
        std::sort(QSequentialIterable::BidirectionalIterator(iterable.mutableBegin()),
                  QSequentialIterable::BidirectionalIterator(iterable.mutableEnd()),
                  compare);
    } else {
        qWarning() << "Container has no suitable iterator for sorting";
    }
}

// helper function to generate valid warnings if errors occur during sequence operations.
static void generateWarning(QV4::ExecutionEngine *v4, const QString& description)
{
    QQmlEngine *engine = v4->qmlEngine();
    if (!engine)
        return;
    QQmlError retn;
    retn.setDescription(description);

    QV4::CppStackFrame *stackFrame = v4->currentStackFrame;

    retn.setLine(stackFrame->lineNumber());
    retn.setUrl(QUrl(stackFrame->source()));
    QQmlEnginePrivate::warning(engine, retn);
}

struct SequenceOwnPropertyKeyIterator : ObjectOwnPropertyKeyIterator
{
    ~SequenceOwnPropertyKeyIterator() override = default;
    PropertyKey next(const Object *o, Property *pd = nullptr, PropertyAttributes *attrs = nullptr) override
    {
        const Sequence *s = static_cast<const Sequence *>(o);

        if (s->d()->isReference) {
            if (!s->d()->object)
                return ObjectOwnPropertyKeyIterator::next(o, pd, attrs);
            s->loadReference();
        }

        if (arrayIndex < quint32(s->size())) {
            uint index = arrayIndex;
            ++arrayIndex;
            if (attrs)
                *attrs = QV4::Attr_Data;
            if (pd)
                pd->value = s->engine()->fromVariant(s->at(index));
            return PropertyKey::fromArrayIndex(index);
        }

        return ObjectOwnPropertyKeyIterator::next(o, pd, attrs);
    }
};

struct SequenceCompareFunctor
{
    SequenceCompareFunctor(QV4::ExecutionEngine *v4, const QV4::Value &compareFn)
        : m_v4(v4), m_compareFn(&compareFn)
    {}

    bool operator()(const QVariant &lhs, const QVariant &rhs)
    {
        QV4::Scope scope(m_v4);
        ScopedFunctionObject compare(scope, m_compareFn);
        if (!compare)
            return m_v4->throwTypeError();
        Value *argv = scope.alloc(2);
        argv[0] = m_v4->fromVariant(lhs);
        argv[1] = m_v4->fromVariant(rhs);
        QV4::ScopedValue result(scope, compare->call(m_v4->globalObject, argv, 2));
        if (scope.hasException())
            return false;
        return result->toNumber() < 0;
    }

private:
    QV4::ExecutionEngine *m_v4;
    const QV4::Value *m_compareFn;
};

struct SequenceDefaultCompareFunctor
{
    bool operator()(const QVariant &lhs, const QVariant &rhs)
    {
        return lhs.toString() < rhs.toString();
    }
};

void Heap::Sequence::init(const QQmlType &qmlType, const void *container)
{
    Object::init();

    Q_ASSERT(qmlType.isSequentialContainer());
    typePrivate = qmlType.priv();
    QQmlType::refHandle(typePrivate);

    this->container = typePrivate->listId.create(container);
    propertyIndex = -1;
    isReference = false;
    isReadOnly = false;
    object.init();

    QV4::Scope scope(internalClass->engine);
    QV4::Scoped<QV4::Sequence> o(scope, this);
    o->setArrayType(Heap::ArrayData::Custom);
}

void Heap::Sequence::init(
        QObject *object, int propertyIndex, const QQmlType &qmlType, bool readOnly)
{
    Object::init();

    Q_ASSERT(qmlType.isSequentialContainer());
    typePrivate = qmlType.priv();
    QQmlType::refHandle(typePrivate);
    container = QMetaType(typePrivate->listId).create();
    this->propertyIndex = propertyIndex;
    isReference = true;
    this->isReadOnly = readOnly;
    this->object.init(object);
    QV4::Scope scope(internalClass->engine);
    QV4::Scoped<QV4::Sequence> o(scope, this);
    o->setArrayType(Heap::ArrayData::Custom);
    o->loadReference();
}

void Heap::Sequence::destroy()
{
    typePrivate->listId.destroy(container);
    QQmlType::derefHandle(typePrivate);
    object.destroy();
    Object::destroy();
}

const QMetaType Sequence::valueMetaType(const Heap::Sequence *p)
{
    return p->typePrivate->typeId;
}

qsizetype Sequence::size() const
{
    const auto *p = d();
    return metaSequence(p)->size(p->container);
}

QVariant Sequence::at(int index) const
{
    const auto *p = d();
    const QMetaType v = valueMetaType(p);
    QVariant result;
    if (v == QMetaType::fromType<QVariant>()) {
        metaSequence(p)->valueAtIndex(p->container, index, &result);
    } else {
        result = QVariant(v);
        metaSequence(p)->valueAtIndex(p->container, index, result.data());
    }
    return result;
}

void Sequence::append(const QVariant &item)
{
    const auto *p = d();
    const auto *m = metaSequence(p);
    const QMetaType v = valueMetaType(p);
    if (item.metaType() == v) {
        m->addValueAtEnd(p->container, item.constData());
    } else if (v == QMetaType::fromType<QVariant>()) {
        m->addValueAtEnd(p->container, &item);
    } else {
        QVariant converted = item;
        if (!converted.convert(v))
            converted = QVariant(v);
        m->addValueAtEnd(p->container, converted.constData());
    }
}

void Sequence::replace(int index, const QVariant &item)
{
    const auto *p = d();
    const auto *m = metaSequence(p);
    const QMetaType v = valueMetaType(p);
    if (item.metaType() == v) {
        m->setValueAtIndex(p->container, index, item.constData());
    } else if (v == QMetaType::fromType<QVariant>()) {
        m->setValueAtIndex(p->container, index, &item);
    } else {
        QVariant converted = item;
        if (!converted.convert(v))
            converted = QVariant(v);
        m->setValueAtIndex(p->container, index, converted.constData());
    }
}

void Sequence::removeLast(int num)
{
    const auto *p = d();
    const auto *m = metaSequence(p);

    if (m->canEraseRangeAtIterator() && m->hasRandomAccessIterator() && num > 1) {
        void *i = m->end(p->container);
        m->advanceIterator(i, -num);
        void *j = m->end(p->container);
        m->eraseRangeAtIterator(p->container, i, j);
        m->destroyIterator(i);
        m->destroyIterator(j);
    } else {
        for (int i = 0; i < num; ++i)
            m->removeValueAtEnd(p->container);
    }
}

QVariant Sequence::toVariant() const
{
    const auto *p = d();
    return QVariant(p->typePrivate->listId, p->container);
}

ReturnedValue Sequence::containerGetIndexed(uint index, bool *hasProperty) const
{
    /* Qt containers have int (rather than uint) allowable indexes. */
    if (index > INT_MAX) {
        generateWarning(engine(), QLatin1String("Index out of range during indexed get"));
        if (hasProperty)
            *hasProperty = false;
        return Encode::undefined();
    }
    if (d()->isReference) {
        if (!d()->object) {
            if (hasProperty)
                *hasProperty = false;
            return Encode::undefined();
        }
        loadReference();
    }
    if (index < quint32(size())) {
        if (hasProperty)
            *hasProperty = true;
        return engine()->fromVariant(at(index));
    }
    if (hasProperty)
        *hasProperty = false;
    return Encode::undefined();
}

bool Sequence::containerPutIndexed(uint index, const Value &value)
{
    if (internalClass()->engine->hasException)
        return false;

    /* Qt containers have int (rather than uint) allowable indexes. */
    if (index > INT_MAX) {
        generateWarning(engine(), QLatin1String("Index out of range during indexed set"));
        return false;
    }

    if (d()->isReadOnly) {
        engine()->throwTypeError(QLatin1String("Cannot insert into a readonly container"));
        return false;
    }

    if (d()->isReference) {
        if (!d()->object)
            return false;
        loadReference();
    }

    quint32 count = quint32(size());
    const QMetaType valueType = valueMetaType(d());
    const QVariant element = engine()->toVariant(value, valueType, false);

    if (index == count) {
        append(element);
    } else if (index < count) {
        replace(index, element);
    } else {
        /* according to ECMA262r3 we need to insert */
        /* the value at the given index, increasing length to index+1. */
        while (index > count++) {
            append(valueType == QMetaType::fromType<QVariant>()
                           ? QVariant()
                           : QVariant(valueType));
        }
        append(element);
    }

    if (d()->isReference)
        storeReference();
    return true;
}

PropertyAttributes Sequence::containerQueryIndexed(uint index) const
{
    /* Qt containers have int (rather than uint) allowable indexes. */
    if (index > INT_MAX) {
        generateWarning(engine(), QLatin1String("Index out of range during indexed query"));
        return QV4::Attr_Invalid;
    }
    if (d()->isReference) {
        if (!d()->object)
            return QV4::Attr_Invalid;
        loadReference();
    }
    return (index < quint32(size())) ? QV4::Attr_Data : QV4::Attr_Invalid;
}

SequenceOwnPropertyKeyIterator *containerOwnPropertyKeys(const Object *m, Value *target)
{
    *target = *m;
    return new SequenceOwnPropertyKeyIterator;
}

bool Sequence::containerDeleteIndexedProperty(uint index)
{
    /* Qt containers have int (rather than uint) allowable indexes. */
    if (index > INT_MAX)
        return false;
    if (d()->isReadOnly)
        return false;
    if (d()->isReference) {
        if (!d()->object)
            return false;
        loadReference();
    }

    if (index >= quint32(size()))
        return false;

    /* according to ECMA262r3 it should be Undefined, */
    /* but we cannot, so we insert a default-value instead. */
    replace(index, QVariant());

    if (d()->isReference)
        storeReference();

    return true;
}

bool Sequence::containerIsEqualTo(Managed *other)
{
    if (!other)
        return false;
    Sequence *otherSequence = other->as<Sequence>();
    if (!otherSequence)
        return false;
    if (d()->isReference && otherSequence->d()->isReference) {
        return d()->object == otherSequence->d()->object && d()->propertyIndex == otherSequence->d()->propertyIndex;
    } else if (!d()->isReference && !otherSequence->d()->isReference) {
        return this == otherSequence;
    }
    return false;
}

bool Sequence::sort(const FunctionObject *f, const Value *, const Value *argv, int argc)
{
    if (d()->isReadOnly)
        return false;
    if (d()->isReference) {
        if (!d()->object)
            return false;
        loadReference();
    }

    if (argc == 1 && argv[0].as<FunctionObject>())
        sortSequence(this, SequenceCompareFunctor(f->engine(), argv[0]));
    else
        sortSequence(this, SequenceDefaultCompareFunctor());

    if (d()->isReference)
        storeReference();

    return true;
}

void *Sequence::getRawContainerPtr() const
{ return d()->container; }

void Sequence::loadReference() const
{
    Q_ASSERT(d()->object);
    Q_ASSERT(d()->isReference);
    void *a[] = { d()->container, nullptr };
    QMetaObject::metacall(d()->object, QMetaObject::ReadProperty, d()->propertyIndex, a);
}

void Sequence::storeReference()
{
    Q_ASSERT(d()->object);
    Q_ASSERT(d()->isReference);
    int status = -1;
    QQmlPropertyData::WriteFlags flags = QQmlPropertyData::DontRemoveBinding;
    void *a[] = { d()->container, nullptr, &status, &flags };
    QMetaObject::metacall(d()->object, QMetaObject::WriteProperty, d()->propertyIndex, a);
}

ReturnedValue Sequence::virtualGet(const Managed *that, PropertyKey id, const Value *receiver, bool *hasProperty)
{
    if (!id.isArrayIndex())
        return Object::virtualGet(that, id, receiver, hasProperty);
    return static_cast<const Sequence *>(that)->containerGetIndexed(id.asArrayIndex(), hasProperty);
}

bool Sequence::virtualPut(Managed *that, PropertyKey id, const Value &value, Value *receiver)
{
    if (id.isArrayIndex())
        return static_cast<Sequence *>(that)->containerPutIndexed(id.asArrayIndex(), value);
    return Object::virtualPut(that, id, value, receiver);
}

PropertyAttributes Sequence::queryIndexed(const Managed *that, uint index)
{ return static_cast<const Sequence *>(that)->containerQueryIndexed(index); }

bool Sequence::virtualDeleteProperty(Managed *that, PropertyKey id)
{
    if (id.isArrayIndex()) {
        uint index = id.asArrayIndex();
        return static_cast<Sequence *>(that)->containerDeleteIndexedProperty(index);
    }
    return Object::virtualDeleteProperty(that, id);
}

bool Sequence::virtualIsEqualTo(Managed *that, Managed *other)
{
    return static_cast<Sequence *>(that)->containerIsEqualTo(other);
}

OwnPropertyKeyIterator *Sequence::virtualOwnPropertyKeys(const Object *m, Value *target)
{
    return containerOwnPropertyKeys(m, target);
}

static QV4::ReturnedValue method_get_length(const FunctionObject *b, const Value *thisObject, const Value *, int)
{
    QV4::Scope scope(b);
    QV4::Scoped<Sequence> This(scope, thisObject->as<Sequence>());
    if (!This)
        THROW_TYPE_ERROR();

    if (This->d()->isReference) {
        if (!This->d()->object)
            RETURN_RESULT(Encode(0));
        This->loadReference();
    }
    RETURN_RESULT(Encode(qint32(This->size())));
}

static QV4::ReturnedValue method_set_length(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc)
{
    QV4::Scope scope(f);
    QV4::Scoped<Sequence> This(scope, thisObject->as<Sequence>());
    if (!This)
        THROW_TYPE_ERROR();

    quint32 newLength = argc ? argv[0].toUInt32() : 0;
    /* Qt containers have int (rather than uint) allowable indexes. */
    if (newLength > INT_MAX) {
        generateWarning(scope.engine, QLatin1String("Index out of range during length set"));
        RETURN_UNDEFINED();
    }

    if (This->d()->isReadOnly)
        THROW_TYPE_ERROR();

    /* Read the sequence from the QObject property if we're a reference */
    if (This->d()->isReference) {
        if (!This->d()->object)
            RETURN_UNDEFINED();
        This->loadReference();
    }
    /* Determine whether we need to modify the sequence */
    quint32 newCount = static_cast<quint32>(newLength);
    quint32 count = static_cast<quint32>(This->size());
    if (newCount == count) {
        RETURN_UNDEFINED();
    } else if (newCount > count) {
        const QMetaType valueMetaType = metaSequence(This->d())->valueMetaType();
        /* according to ECMA262r3 we need to insert */
        /* undefined values increasing length to newLength. */
        /* We cannot, so we insert default-values instead. */
        while (newCount > count++)
            This->append(QVariant(valueMetaType));
    } else {
        /* according to ECMA262r3 we need to remove */
        /* elements until the sequence is the required length. */
        if (newCount < count)
            This->removeLast(count - newCount);
    }
    /* write back if required. */
    if (This->d()->isReference) {
        /* write back.  already checked that object is non-null, so skip that check here. */
        This->storeReference();
    }
    RETURN_UNDEFINED();
}

void SequencePrototype::init()
{
    defineDefaultProperty(QStringLiteral("sort"), method_sort, 1);
    defineDefaultProperty(engine()->id_valueOf(), method_valueOf, 0);
    defineAccessorProperty(QStringLiteral("length"), method_get_length, method_set_length);
}

ReturnedValue SequencePrototype::method_valueOf(const FunctionObject *f, const Value *thisObject, const Value *, int)
{
    return Encode(thisObject->toString(f->engine()));
}

ReturnedValue SequencePrototype::method_sort(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)
{
    Scope scope(b);
    QV4::ScopedObject o(scope, thisObject);
    if (!o || !o->isListType())
        THROW_TYPE_ERROR();

    if (argc >= 2)
        return o.asReturnedValue();

    if (auto *s = o->as<Sequence>()) {
        if (!s->sort(b, thisObject, argv, argc))
            THROW_TYPE_ERROR();
    }

    return o.asReturnedValue();
}

ReturnedValue SequencePrototype::newSequence(
        QV4::ExecutionEngine *engine, QMetaType sequenceType, QObject *object,
        int propertyIndex,  bool readOnly, bool *succeeded)
{
    QV4::Scope scope(engine);
    // This function is called when the property is a QObject Q_PROPERTY of
    // the given sequence type.  Internally we store a sequence
    // (as well as object ptr + property index for updated-read and write-back)
    // and so access/mutate avoids variant conversion.

    const QQmlType qmlType = QQmlMetaType::qmlListType(sequenceType);
    if (qmlType.isSequentialContainer()) {
        *succeeded = true;
        QV4::ScopedObject obj(scope, engine->memoryManager->allocate<Sequence>(
                                  object, propertyIndex, qmlType, readOnly));
        return obj.asReturnedValue();
    }

    *succeeded = false;
    return Encode::undefined();
}

ReturnedValue SequencePrototype::fromVariant(
        QV4::ExecutionEngine *engine, const QVariant &v, bool *succeeded)
{
    return fromData(engine, v.metaType(), v.constData(), succeeded);
}

ReturnedValue SequencePrototype::fromData(ExecutionEngine *engine, QMetaType type, const void *data, bool *succeeded)
{
    QV4::Scope scope(engine);
    // This function is called when assigning a sequence value to a normal JS var
    // in a JS block.  Internally, we store a sequence of the specified type.
    // Access and mutation is extremely fast since it will not need to modify any
    // QObject property.

    const QQmlType qmlType = QQmlMetaType::qmlListType(type);
    if (qmlType.isSequentialContainer()) {
        *succeeded = true;
        QV4::ScopedObject obj(scope, engine->memoryManager->allocate<Sequence>(qmlType, data));
        return obj.asReturnedValue();
    }

    *succeeded = false;
    return Encode::undefined();
}

QVariant SequencePrototype::toVariant(const Sequence *object)
{
    Q_ASSERT(object->isListType());
    return object->toVariant();
}

QVariant SequencePrototype::toVariant(const QV4::Value &array, QMetaType typeHint, bool *succeeded)
{
    *succeeded = true;

    if (!array.as<ArrayObject>()) {
        *succeeded = false;
        return QVariant();
    }
    QV4::Scope scope(array.as<Object>()->engine());
    QV4::ScopedArrayObject a(scope, array);

    const QQmlType type = QQmlMetaType::qmlListType(typeHint);
    if (type.isSequentialContainer()) {
        const QQmlTypePrivate *priv = type.priv();
        const QMetaSequence *meta = priv->extraData.ld;
        const QMetaType containerMetaType(priv->listId);
        QVariant result(containerMetaType);
        quint32 length = a->getLength();
        QV4::ScopedValue v(scope);
        for (quint32 i = 0; i < length; ++i) {
            const QMetaType valueMetaType = priv->typeId;
            QVariant variant = scope.engine->toVariant(a->get(i), valueMetaType, false);
            if (valueMetaType == QMetaType::fromType<QVariant>()) {
                meta->addValueAtEnd(result.data(), &variant);
            } else {
                const QMetaType originalType = variant.metaType();
                if (originalType != valueMetaType && !variant.convert(valueMetaType)) {
                    qWarning() << QLatin1String(
                                      "Could not convert array value at position %1 from %2 to %3")
                                  .arg(QString::number(i), QString::fromUtf8(originalType.name()),
                                       QString::fromUtf8(valueMetaType.name()));
                    variant = QVariant(valueMetaType);
                }
                meta->addValueAtEnd(result.data(), variant.constData());
            }
        }
        return result;
    }

    *succeeded = false;
    return QVariant();
}

void *SequencePrototype::getRawContainerPtr(const Sequence *object, QMetaType typeHint)
{
    if (object->d()->typePrivate->listId == typeHint)
        return object->getRawContainerPtr();
    return nullptr;
}

QMetaType SequencePrototype::metaTypeForSequence(const Sequence *object)
{
    return object->d()->typePrivate->listId;
}

} // namespace QV4

QT_END_NAMESPACE

#include "moc_qv4sequenceobject_p.cpp"