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/qv4arrayobject.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qml/jsruntime/qv4arrayobject.cpp') diff --git a/src/qml/jsruntime/qv4arrayobject.cpp b/src/qml/jsruntime/qv4arrayobject.cpp index c106d5531f..434f6781a8 100644 --- a/src/qml/jsruntime/qv4arrayobject.cpp +++ b/src/qml/jsruntime/qv4arrayobject.cpp @@ -473,7 +473,7 @@ ReturnedValue ArrayPrototype::method_entries(const FunctionObject *b, const Valu RETURN_UNDEFINED(); Scoped ao(scope, scope.engine->newArrayIteratorObject(O)); - ao->d()->iterationKind = ArrayIteratorKind::KeyValueIteratorKind; + ao->d()->iterationKind = IteratorKind::KeyValueIteratorKind; return ao->asReturnedValue(); } @@ -1083,7 +1083,7 @@ ReturnedValue ArrayPrototype::method_keys(const FunctionObject *f, const Value * RETURN_UNDEFINED(); Scoped ao(scope, scope.engine->newArrayIteratorObject(O)); - ao->d()->iterationKind = ArrayIteratorKind::KeyIteratorKind; + ao->d()->iterationKind = IteratorKind::KeyIteratorKind; return ao->asReturnedValue(); } @@ -1446,7 +1446,7 @@ ReturnedValue ArrayPrototype::method_values(const FunctionObject *b, const Value RETURN_UNDEFINED(); Scoped ao(scope, scope.engine->newArrayIteratorObject(O)); - ao->d()->iterationKind = ArrayIteratorKind::ValueIteratorKind; + ao->d()->iterationKind = IteratorKind::ValueIteratorKind; return ao->asReturnedValue(); } -- cgit v1.2.3