chromium/v8/src/torque/implementation-visitor.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_TORQUE_IMPLEMENTATION_VISITOR_H_
#define V8_TORQUE_IMPLEMENTATION_VISITOR_H_

#include <memory>
#include <optional>
#include <string>

#include "src/base/macros.h"
#include "src/torque/ast.h"
#include "src/torque/cfg.h"
#include "src/torque/cpp-builder.h"
#include "src/torque/declarations.h"
#include "src/torque/global-context.h"
#include "src/torque/type-oracle.h"
#include "src/torque/types.h"
#include "src/torque/utils.h"

namespace v8::internal::torque {

template <typename T>
class Binding;
class LocalValue;
class ImplementationVisitor;

// LocationReference is the representation of an l-value, so a value that might
// allow for assignment. For uniformity, this class can also represent
// unassignable temporaries. Assignable values fall in two categories:
//   - stack ranges that represent mutable variables, including structs.
//   - field or element access expressions that generate operator calls.
class LocationReference {};

struct InitializerResults {};

struct LayoutForInitialization {};

extern uint64_t next_unique_binding_index;

template <class T>
class Binding;

template <class T>
class BindingsManager {};

template <class T>
class Binding : public T {};

template <class T>
class BlockBindings {};

class LocalValue {};

struct LocalLabel {};

template <>
inline std::string Binding<LocalValue>::BindingTypeString() const {}
template <>
inline bool Binding<LocalValue>::CheckWritten() const {}
template <>
inline std::string Binding<LocalLabel>::BindingTypeString() const {}
template <>
inline bool Binding<LocalLabel>::CheckWritten() const {}

struct Arguments {};

// Determine if a callable should be considered as an overload.
bool IsCompatibleSignature(const Signature& sig, const TypeVector& types,
                           size_t label_count);

class ImplementationVisitor {};

void ReportAllUnusedMacros();

}  // namespace v8::internal::torque

#endif  // V8_TORQUE_IMPLEMENTATION_VISITOR_H_