// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@abstract
@cppObjectLayoutDefinition
extern class JSCollection extends JSObject {
// The backing hash table.
//
// Use StableOrderedHasSet or StableOrderedHashMap to read.
table: Object;
}
@cppObjectLayoutDefinition
extern class JSSet extends JSCollection {}
@cppObjectLayoutDefinition
extern class JSMap extends JSCollection {}
@abstract
@cppObjectLayoutDefinition
extern class JSWeakCollection extends JSObject {
// The backing hash table mapping keys to values.
table: Object;
}
@cppObjectLayoutDefinition
extern class JSWeakSet extends JSWeakCollection {}
@cppObjectLayoutDefinition
extern class JSWeakMap extends JSWeakCollection {}
@abstract
@cppObjectLayoutDefinition
extern class JSMapIterator extends JSCollectionIterator {}
extern class JSMapKeyIterator extends JSMapIterator
generates 'JSMapIterator';
extern class JSMapKeyValueIterator extends JSMapIterator
generates 'JSMapIterator';
extern class JSMapValueIterator extends JSMapIterator
generates 'JSMapIterator';
@abstract
@cppObjectLayoutDefinition
extern class JSSetIterator extends JSCollectionIterator {}
extern class JSSetKeyValueIterator extends JSSetIterator
generates 'JSSetIterator';
extern class JSSetValueIterator extends JSSetIterator
generates 'JSSetIterator';
transient type JSSetWithNoCustomIteration extends JSSet;
transient type JSMapWithNoCustomIteration extends JSMap;
// Use these types to read. Used to track user code modifying the underlying
// table.
transient type StableOrderedHashSet extends OrderedHashSet;
transient type StableOrderedHashMap extends OrderedHashMap;