5 #ifndef V8_OBJECTS_JS_COLLECTION_INL_H_ 6 #define V8_OBJECTS_JS_COLLECTION_INL_H_ 8 #include "src/objects/js-collection.h" 10 #include "src/objects-inl.h" 13 #include "src/objects/object-macros.h" 18 ACCESSORS(JSCollection, table, Object, kTableOffset)
19 ACCESSORS(JSCollectionIterator, table, Object, kTableOffset)
20 ACCESSORS(JSCollectionIterator, index, Object, kIndexOffset)
22 ACCESSORS(JSWeakCollection, table, Object, kTableOffset)
25 CAST_ACCESSOR(JSSetIterator)
27 CAST_ACCESSOR(JSMapIterator)
28 CAST_ACCESSOR(JSWeakCollection)
29 CAST_ACCESSOR(JSWeakMap)
30 CAST_ACCESSOR(JSWeakSet)
32 Object* JSMapIterator::CurrentValue() {
33 OrderedHashMap table = OrderedHashMap::cast(this->table());
34 int index = Smi::ToInt(this->index());
35 Object* value = table->ValueAt(index);
36 DCHECK(!value->IsTheHole());
43 #include "src/objects/object-macros-undef.h" 45 #endif // V8_OBJECTS_JS_COLLECTION_INL_H_