5#ifndef V8_BASE_ADDRESS_REGION_H_
6#define V8_BASE_ADDRESS_REGION_H_
22 return a.begin() < b.
begin();
42 static_assert(std::is_unsigned<Address>::value);
47 static_assert(std::is_unsigned<Address>::value);
53 return contains(region.address_, region.size_);
57 Address overlap_start = std::max(
begin(), region.begin());
59 std::max(overlap_start, std::min(
end(), region.end()));
60 return {overlap_start, overlap_end - overlap_start};
86template <
typename Container>
93 return out <<
"[" <<
reinterpret_cast<void*
>(region.begin()) <<
"+"
94 << region.size() <<
"]";
constexpr AddressRegion(Address address, size_t size)
base::AddressRegion GetOverlap(AddressRegion region) const
bool operator==(AddressRegion other) const
bool contains(Address address, size_t size) const
bool contains(Address address) const
bool contains(AddressRegion region) const
void set_size(size_t size)
constexpr AddressRegion()=default
bool operator!=(AddressRegion other) const
AddressRegion AddressRegionOf(T *ptr, size_t size)
std::ostream & operator<<(std::ostream &out, AddressRegion region)
#define ASSERT_TRIVIALLY_COPYABLE(T)
bool operator()(base::AddressRegion a, base::AddressRegion b) const