chromium/v8/src/compiler/turboshaft/types.cc

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

#include "src/compiler/turboshaft/types.h"

#include <optional>
#include <sstream>
#include <string_view>

#include "src/base/logging.h"
#include "src/compiler/turboshaft/type-parser.h"
#include "src/heap/factory.h"
#include "src/objects/turboshaft-types-inl.h"

namespace v8::internal::compiler::turboshaft {

namespace {

std::pair<uint32_t, uint32_t> uint64_to_high_low(uint64_t value) {}

}  // namespace

bool Type::Equals(const Type& other) const {}

bool Type::IsSubtypeOf(const Type& other) const {}

void Type::PrintTo(std::ostream& stream) const {}

void Type::Print() const {}

// static
Type Type::LeastUpperBound(const Type& lhs, const Type& rhs, Zone* zone) {}

std::optional<Type> Type::ParseFromString(const std::string_view& str,
                                          Zone* zone) {}

Handle<TurboshaftType> Type::AllocateOnHeap(Factory* factory) const {}

template <size_t Bits>
bool WordType<Bits>::Contains(word_t value) const {}

template <size_t Bits>
bool WordType<Bits>::Equals(const WordType<Bits>& other) const {}

template <size_t Bits>
bool WordType<Bits>::IsSubtypeOf(const WordType<Bits>& other) const {}

template <size_t Bits, typename word_t = typename WordType<Bits>::word_t>
WordType<Bits> LeastUpperBoundFromRanges(word_t l_from, word_t l_to,
                                         word_t r_from, word_t r_to,
                                         Zone* zone) {}

template <size_t Bits>
// static
WordType<Bits> WordType<Bits>::LeastUpperBound(const WordType<Bits>& lhs,
                                               const WordType<Bits>& rhs,
                                               Zone* zone) {}

template <size_t Bits>
Type WordType<Bits>::Intersect(const WordType<Bits>& lhs,
                               const WordType<Bits>& rhs,
                               ResolutionMode resolution_mode, Zone* zone) {}

template <size_t Bits>
void WordType<Bits>::PrintTo(std::ostream& stream) const {}

template <size_t Bits>
Handle<TurboshaftType> WordType<Bits>::AllocateOnHeap(Factory* factory) const {}

template <size_t Bits>
bool FloatType<Bits>::Contains(float_t value) const {}

template <size_t Bits>
bool FloatType<Bits>::Equals(const FloatType<Bits>& other) const {}

template <size_t Bits>
bool FloatType<Bits>::IsSubtypeOf(const FloatType<Bits>& other) const {}

template <size_t Bits>
// static
FloatType<Bits> FloatType<Bits>::LeastUpperBound(const FloatType<Bits>& lhs,
                                                 const FloatType<Bits>& rhs,
                                                 Zone* zone) {}

template <size_t Bits>
// static
Type FloatType<Bits>::Intersect(const FloatType<Bits>& lhs,
                                const FloatType<Bits>& rhs, Zone* zone) {}

template <size_t Bits>
void FloatType<Bits>::PrintTo(std::ostream& stream) const {}

template <size_t Bits>
Handle<TurboshaftType> FloatType<Bits>::AllocateOnHeap(Factory* factory) const {}

bool TupleType::Equals(const TupleType& other) const {}

bool TupleType::IsSubtypeOf(const TupleType& other) const {}

// static
Type TupleType::LeastUpperBound(const TupleType& lhs, const TupleType& rhs,
                                Zone* zone) {}

void TupleType::PrintTo(std::ostream& stream) const {}

template class EXPORT_TEMPLATE_DEFINE(V8_EXPORT_PRIVATE) WordType<32>;
template class EXPORT_TEMPLATE_DEFINE(V8_EXPORT_PRIVATE) WordType<64>;
template class EXPORT_TEMPLATE_DEFINE(V8_EXPORT_PRIVATE) FloatType<32>;
template class EXPORT_TEMPLATE_DEFINE(V8_EXPORT_PRIVATE) FloatType<64>;

}  // namespace v8::internal::compiler::turboshaft