#ifndef V8_ZONE_ZONE_COMPACT_SET_H_
#define V8_ZONE_ZONE_COMPACT_SET_H_
#include <algorithm>
#include <initializer_list>
#include <type_traits>
#include "src/base/compiler-specific.h"
#include "src/base/pointer-with-payload.h"
#include "src/common/assert-scope.h"
#include "src/handles/handles.h"
#include "src/zone/zone-containers.h"
#include "src/zone/zone.h"
namespace v8 {
namespace internal {
template <typename T, typename Enable = void>
struct ZoneCompactSetTraits;
template <typename T>
struct ZoneCompactSetTraits<Handle<T>> {
using handle_type = Handle<T>;
using data_type = Address;
static data_type* HandleToPointer(handle_type handle) {
return reinterpret_cast<Address*>(handle.address());
}
static handle_type PointerToHandle(data_type* ptr) {
return handle_type(ptr);
}
};
template <typename T>
class ZoneCompactSet final { … };
template <typename T>
std::ostream& operator<<(std::ostream& os, ZoneCompactSet<T> set) { … }
template <typename T>
class ZoneCompactSet<T>::const_iterator { … };
template <typename T>
typename ZoneCompactSet<T>::const_iterator ZoneCompactSet<T>::begin() const { … }
template <typename T>
typename ZoneCompactSet<T>::const_iterator ZoneCompactSet<T>::end() const { … }
ZoneHandleSet;
}
}
#endif