diff options
author | Robin Burchell <robin.burchell@crimson.no> | 2018-05-29 22:41:34 +0200 |
---|---|---|
committer | Robin Burchell <robin.burchell@crimson.no> | 2018-06-01 11:53:37 +0000 |
commit | a0fcf724ef1d8586301a913d2cd744aed33e3605 (patch) | |
tree | 07f9c32d835b0323e591fc5dc6f840f3ce426528 /src/qml/jsruntime/qv4engine_p.h | |
parent | 19f657d9957e29034c719d6a6b015f7a78ae1a4a (diff) |
Add the start of a Map from ES7
Like Set, for the time being, this is baseed on top of ArrayObject: two
of them, one for keys, one for values. Again, this goes against the
spirit of the spec (which requires nonlinear access), but having the API
present is at least a start, and the implementation is easily changed.
Change-Id: Idcf0ad8d92eb5daac734d52e8e2dd4c8e0dd5109
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4engine_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4engine_p.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h index 9e5f3fa162..ecc110a16f 100644 --- a/src/qml/jsruntime/qv4engine_p.h +++ b/src/qml/jsruntime/qv4engine_p.h @@ -187,12 +187,14 @@ public: ArrayBufferProto, DataViewProto, SetProto, + MapProto, IntrinsicTypedArrayProto, ValueTypeProto, SignalHandlerProto, IteratorProto, ForInIteratorProto, SetIteratorProto, + MapIteratorProto, ArrayIteratorProto, StringIteratorProto, @@ -216,6 +218,7 @@ public: ArrayBuffer_Ctor, DataView_Ctor, Set_Ctor, + Map_Ctor, IntrinsicTypedArray_Ctor, GetSymbolSpecies, @@ -251,6 +254,7 @@ public: FunctionObject *arrayBufferCtor() const { return reinterpret_cast<FunctionObject *>(jsObjects + ArrayBuffer_Ctor); } FunctionObject *dataViewCtor() const { return reinterpret_cast<FunctionObject *>(jsObjects + DataView_Ctor); } FunctionObject *setCtor() const { return reinterpret_cast<FunctionObject *>(jsObjects + Set_Ctor); } + FunctionObject *mapCtor() const { return reinterpret_cast<FunctionObject *>(jsObjects + Map_Ctor); } FunctionObject *intrinsicTypedArrayCtor() const { return reinterpret_cast<FunctionObject *>(jsObjects + IntrinsicTypedArray_Ctor); } FunctionObject *typedArrayCtors; @@ -283,6 +287,7 @@ public: Object *arrayBufferPrototype() const { return reinterpret_cast<Object *>(jsObjects + ArrayBufferProto); } Object *dataViewPrototype() const { return reinterpret_cast<Object *>(jsObjects + DataViewProto); } Object *setPrototype() const { return reinterpret_cast<Object *>(jsObjects + SetProto); } + Object *mapPrototype() const { return reinterpret_cast<Object *>(jsObjects + MapProto); } Object *intrinsicTypedArrayPrototype() const { return reinterpret_cast<Object *>(jsObjects + IntrinsicTypedArrayProto); } Object *typedArrayPrototype; @@ -291,6 +296,7 @@ public: Object *iteratorPrototype() const { return reinterpret_cast<Object *>(jsObjects + IteratorProto); } Object *forInIteratorPrototype() const { return reinterpret_cast<Object *>(jsObjects + ForInIteratorProto); } Object *setIteratorPrototype() const { return reinterpret_cast<Object *>(jsObjects + SetIteratorProto); } + Object *mapIteratorPrototype() const { return reinterpret_cast<Object *>(jsObjects + MapIteratorProto); } Object *arrayIteratorPrototype() const { return reinterpret_cast<Object *>(jsObjects + ArrayIteratorProto); } Object *stringIteratorPrototype() const { return reinterpret_cast<Object *>(jsObjects + StringIteratorProto); } @@ -517,6 +523,7 @@ public: Heap::Object *newForInIteratorObject(Object *o); Heap::Object *newSetIteratorObject(Object *o); + Heap::Object *newMapIteratorObject(Object *o); Heap::Object *newArrayIteratorObject(Object *o); Heap::QmlContext *qmlContext() const; |