chromium/v8/src/objects/js-collection.h

// Copyright 2017 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.

#ifndef V8_OBJECTS_JS_COLLECTION_H_
#define V8_OBJECTS_JS_COLLECTION_H_

#include "src/objects/js-collection-iterator.h"
#include "src/objects/objects.h"

// Has to be the last include (doesn't have include guards):
#include "src/objects/object-macros.h"

namespace v8 {
namespace internal {

class OrderedHashSet;
class OrderedHashMap;

#include "torque-generated/src/objects/js-collection-tq.inc"

class JSCollection
    : public TorqueGeneratedJSCollection<JSCollection, JSObject> {};

// The JSSet describes ECMAScript Harmony sets
class JSSet : public TorqueGeneratedJSSet<JSSet, JSCollection> {};

class JSSetIterator
    : public OrderedHashTableIterator<JSSetIterator, OrderedHashSet> {};

// The JSMap describes ECMAScript Harmony maps
class JSMap : public TorqueGeneratedJSMap<JSMap, JSCollection> {};

class JSMapIterator
    : public OrderedHashTableIterator<JSMapIterator, OrderedHashMap> {};

// Base class for both JSWeakMap and JSWeakSet
class JSWeakCollection
    : public TorqueGeneratedJSWeakCollection<JSWeakCollection, JSObject> {};

// The JSWeakMap describes ECMAScript Harmony weak maps
class JSWeakMap : public TorqueGeneratedJSWeakMap<JSWeakMap, JSWeakCollection> {};

// The JSWeakSet describes ECMAScript Harmony weak sets
class JSWeakSet : public TorqueGeneratedJSWeakSet<JSWeakSet, JSWeakCollection> {};

}  // namespace internal
}  // namespace v8

#include "src/objects/object-macros-undef.h"

#endif  // V8_OBJECTS_JS_COLLECTION_H_