#ifndef V8_COMPILER_TURBOSHAFT_TYPES_H_
#define V8_COMPILER_TURBOSHAFT_TYPES_H_
#include <cmath>
#include <limits>
#include <optional>
#include "src/base/container-utils.h"
#include "src/base/export-template.h"
#include "src/base/logging.h"
#include "src/base/small-vector.h"
#include "src/common/globals.h"
#include "src/compiler/turboshaft/fast-hash.h"
#include "src/numbers/conversions.h"
#include "src/objects/turboshaft-types.h"
#include "src/utils/ostreams.h"
#include "src/zone/zone-containers.h"
#ifdef DEBUG
#define TURBOSHAFT_TRACE_TYPING(...) …
#define TURBOSHAFT_TRACE_TYPING_WITH_COLOR(colorcode, str, ...) …
#define TURBOSHAFT_TRACE_TYPING_OK(str, ...) …
#define TURBOSHAFT_TRACE_TYPING_FAIL(str, ...) …
#else
#define TURBOSHAFT_TRACE_TYPING …
#define TURBOSHAFT_TRACE_TYPING_WITH_COLOR …
#define TURBOSHAFT_TRACE_TYPING_OK …
#define TURBOSHAFT_TRACE_TYPING_FAIL …
#endif
namespace v8::internal {
class Factory;
}
namespace v8::internal::compiler::turboshaft {
namespace detail {
template <typename T>
inline bool is_unique_and_sorted(const T& container) { … }
template <typename T>
inline bool is_minus_zero(T value) { … }
template <typename T>
inline bool is_float_special_value(T value) { … }
template <size_t Bits>
struct TypeForBits;
template <>
struct TypeForBits<32> { … };
template <>
struct TypeForBits<64> { … };
struct Payload_Empty { … };
template <typename T>
struct Payload_Range { … };
template <typename T>
struct Payload_InlineSet { … };
template <typename T>
struct Payload_OutlineSet { … };
}
template <typename T>
std::enable_if_t<std::is_floating_point<T>::value, T> next_smaller(T v) { … }
template <typename T>
std::enable_if_t<std::is_floating_point<T>::value, T> next_larger(T v) { … }
template <typename T>
std::enable_if_t<std::is_integral<T>::value, T> next_smaller(T v) { … }
template <typename T>
std::enable_if_t<std::is_integral<T>::value, T> next_larger(T v) { … }
uint_type;
float_type;
nan_v = detail::TypeForBits<Bits>::nan;
template <size_t Bits>
class WordType;
template <size_t Bits>
class FloatType;
class TupleType;
Word32Type;
Word64Type;
Float32Type;
Float64Type;
class V8_EXPORT_PRIVATE Type { … };
static_assert …;
template <size_t Bits>
class WordType : public Type { … };
extern template class EXPORT_TEMPLATE_DECLARE(V8_EXPORT_PRIVATE) WordType<32>;
extern template class EXPORT_TEMPLATE_DECLARE(V8_EXPORT_PRIVATE) WordType<64>;
template <size_t Bits>
class FloatType : public Type { … };
extern template class EXPORT_TEMPLATE_DECLARE(V8_EXPORT_PRIVATE) FloatType<32>;
extern template class EXPORT_TEMPLATE_DECLARE(V8_EXPORT_PRIVATE) FloatType<64>;
class TupleType : public Type { … };
const Word32Type& Type::AsWord32() const { … }
const Word64Type& Type::AsWord64() const { … }
const Float32Type& Type::AsFloat32() const { … }
const Float64Type& Type::AsFloat64() const { … }
const TupleType& Type::AsTuple() const { … }
inline std::ostream& operator<<(std::ostream& stream, Type::Kind kind) { … }
inline std::ostream& operator<<(std::ostream& stream, const Type& type) { … }
inline bool operator==(const Type& lhs, const Type& rhs) { … }
inline bool operator!=(const Type& lhs, const Type& rhs) { … }
template <>
struct fast_hash<Type> { … };
}
#endif