| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index de3026eefca666af7091ca20f1b5a8888ffa7afc..fefe3e62287a3477508790cbc1fc4f8114113537 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -432,6 +432,7 @@ const int kStubMinorKeyBits = kSmiValueSize - kStubMajorKeyBits - 1;
|
| V(JS_PROMISE_TYPE) \
|
| V(JS_REGEXP_TYPE) \
|
| V(JS_ERROR_TYPE) \
|
| + V(JS_STRING_ITERATOR_TYPE) \
|
| \
|
| V(JS_BOUND_FUNCTION_TYPE) \
|
| V(JS_FUNCTION_TYPE) \
|
| @@ -724,6 +725,7 @@ enum InstanceType {
|
| JS_PROMISE_TYPE,
|
| JS_REGEXP_TYPE,
|
| JS_ERROR_TYPE,
|
| + JS_STRING_ITERATOR_TYPE,
|
| JS_BOUND_FUNCTION_TYPE,
|
| JS_FUNCTION_TYPE, // LAST_JS_OBJECT_TYPE, LAST_JS_RECEIVER_TYPE
|
|
|
| @@ -1006,6 +1008,7 @@ template <class C> inline bool Is(Object* obj);
|
| V(JSProxy) \
|
| V(JSError) \
|
| V(JSPromise) \
|
| + V(JSStringIterator) \
|
| V(JSSet) \
|
| V(JSMap) \
|
| V(JSSetIterator) \
|
| @@ -2612,6 +2615,13 @@ class JSDataPropertyDescriptor: public JSObject {
|
| // as specified by ES6 section 25.1.1.3 The IteratorResult Interface
|
| class JSIteratorResult: public JSObject {
|
| public:
|
| + DECL_ACCESSORS(value, Object)
|
| +
|
| + DECL_ACCESSORS(done, Object)
|
| +
|
| + static void Initialize(Handle<JSIteratorResult> object, Handle<Object> value,
|
| + Handle<Object> done);
|
| +
|
| // Offsets of object fields.
|
| static const int kValueOffset = JSObject::kHeaderSize;
|
| static const int kDoneOffset = kValueOffset + kPointerSize;
|
| @@ -10240,6 +10250,27 @@ class JSMap : public JSCollection {
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(JSMap);
|
| };
|
|
|
| +class JSStringIterator : public JSObject {
|
| + public:
|
| + // Dispatched behavior.
|
| + DECLARE_PRINTER(JSStringIterator)
|
| + DECLARE_VERIFIER(JSStringIterator)
|
| +
|
| + DECLARE_CAST(JSStringIterator)
|
| +
|
| + // [string]: the [[IteratedString]] internal field.
|
| + DECL_ACCESSORS(string, String)
|
| +
|
| + // [index]: The [[StringIteratorNextIndex]] internal field.
|
| + DECL_ACCESSORS(index, Object)
|
| +
|
| + static const int kStringOffset = JSObject::kHeaderSize;
|
| + static const int kNextIndexOffset = kStringOffset + kPointerSize;
|
| + static const int kSize = kNextIndexOffset + kPointerSize;
|
| +
|
| + private:
|
| + DISALLOW_IMPLICIT_CONSTRUCTORS(JSStringIterator);
|
| +};
|
|
|
| // OrderedHashTableIterator is an iterator that iterates over the keys and
|
| // values of an OrderedHashTable.
|
|
|