From 19f657d9957e29034c719d6a6b015f7a78ae1a4a Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Sun, 27 May 2018 15:04:23 +0200 Subject: Add the start of a Set from ES7 Based on top of an ArrayObject for now, which is admittedly a bit of a cheat and not matching the "spirit" of the spec. OTOH, that makes it easy to write, and is presumably quite lightweight, so perhaps this is acceptable as a starting point. Change-Id: Ibc98137965b3e75635b960a2f88c251d45e6e837 Reviewed-by: Lars Knoll --- src/qml/jsruntime/qv4arrayiterator_p.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/qml/jsruntime/qv4arrayiterator_p.h') diff --git a/src/qml/jsruntime/qv4arrayiterator_p.h b/src/qml/jsruntime/qv4arrayiterator_p.h index 2951c9a763..6d6bb466f1 100644 --- a/src/qml/jsruntime/qv4arrayiterator_p.h +++ b/src/qml/jsruntime/qv4arrayiterator_p.h @@ -53,6 +53,7 @@ // #include "qv4object_p.h" +#include "qv4iterator_p.h" #include "qv4arraydata_p.h" QT_BEGIN_NAMESPACE @@ -60,20 +61,11 @@ QT_BEGIN_NAMESPACE namespace QV4 { -// ### spec says that this is a string, but I don't see it exposed anywhere, so -// does that matter? -// ### maybe we should share this with other iterator types in the future. -enum ArrayIteratorKind { - KeyIteratorKind, - ValueIteratorKind, - KeyValueIteratorKind -}; - namespace Heap { #define ArrayIteratorObjectMembers(class, Member) \ Member(class, Pointer, Object *, iteratedObject) \ - Member(class, NoMark, ArrayIteratorKind, iterationKind) \ + Member(class, NoMark, IteratorKind, iterationKind) \ Member(class, NoMark, quint32, nextIndex) DECLARE_HEAP_OBJECT(ArrayIteratorObject, Object) { -- cgit v1.2.3