#ifndef V8_COMPILER_COMMON_OPERATOR_H_
#define V8_COMPILER_COMMON_OPERATOR_H_
#include <optional>
#include "src/base/compiler-specific.h"
#include "src/codegen/machine-type.h"
#include "src/codegen/reloc-info.h"
#include "src/common/globals.h"
#include "src/compiler/feedback-source.h"
#include "src/compiler/frame-states.h"
#include "src/compiler/linkage.h"
#include "src/compiler/node-properties.h"
#include "src/compiler/use-info.h"
#include "src/deoptimizer/deoptimize-reason.h"
#include "src/zone/zone-containers.h"
namespace v8 {
namespace internal {
V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, BranchHint);
namespace compiler {
class CallDescriptor;
struct CommonOperatorGlobalCache;
class Operator;
class Type;
class Node;
enum class BranchSemantics { … };
V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, BranchSemantics);
inline BranchHint NegateBranchHint(BranchHint hint) { … }
#if V8_ENABLE_WEBASSEMBLY
enum class TrapId : int32_t { … };
static_assert(std::is_same_v<std::underlying_type_t<Builtin>,
std::underlying_type_t<TrapId>>);
inline size_t hash_value(TrapId id) { … }
std::ostream& operator<<(std::ostream&, TrapId trap_id);
TrapId TrapIdOf(const Operator* const op);
#endif
class BranchParameters final { … };
bool operator==(const BranchParameters& lhs, const BranchParameters& rhs);
inline bool operator!=(const BranchParameters& lhs,
const BranchParameters& rhs) { … }
size_t hash_value(const BranchParameters& p);
std::ostream& operator<<(std::ostream&, const BranchParameters& p);
V8_EXPORT_PRIVATE const BranchParameters& BranchParametersOf(
const Operator* const) V8_WARN_UNUSED_RESULT;
V8_EXPORT_PRIVATE BranchHint BranchHintOf(const Operator* const)
V8_WARN_UNUSED_RESULT;
class AssertParameters final { … };
bool operator==(const AssertParameters& lhs, const AssertParameters& rhs);
size_t hash_value(const AssertParameters& p);
std::ostream& operator<<(std::ostream&, const AssertParameters& p);
V8_EXPORT_PRIVATE const AssertParameters& AssertParametersOf(
const Operator* const) V8_WARN_UNUSED_RESULT;
int ValueInputCountOfReturn(Operator const* const op);
class DeoptimizeParameters final { … };
bool operator==(DeoptimizeParameters, DeoptimizeParameters);
bool operator!=(DeoptimizeParameters, DeoptimizeParameters);
size_t hast_value(DeoptimizeParameters p);
std::ostream& operator<<(std::ostream&, DeoptimizeParameters p);
DeoptimizeParameters const& DeoptimizeParametersOf(Operator const* const)
V8_WARN_UNUSED_RESULT;
class SelectParameters final { … };
bool operator==(SelectParameters const&, SelectParameters const&);
bool operator!=(SelectParameters const&, SelectParameters const&);
size_t hash_value(SelectParameters const& p);
std::ostream& operator<<(std::ostream&, SelectParameters const& p);
V8_EXPORT_PRIVATE SelectParameters const& SelectParametersOf(
const Operator* const) V8_WARN_UNUSED_RESULT;
V8_EXPORT_PRIVATE CallDescriptor const* CallDescriptorOf(const Operator* const)
V8_WARN_UNUSED_RESULT;
V8_EXPORT_PRIVATE size_t ProjectionIndexOf(const Operator* const)
V8_WARN_UNUSED_RESULT;
V8_EXPORT_PRIVATE MachineRepresentation
LoopExitValueRepresentationOf(const Operator* const) V8_WARN_UNUSED_RESULT;
V8_EXPORT_PRIVATE MachineRepresentation
PhiRepresentationOf(const Operator* const) V8_WARN_UNUSED_RESULT;
class ParameterInfo final { … };
std::ostream& operator<<(std::ostream&, ParameterInfo const&);
V8_EXPORT_PRIVATE int ParameterIndexOf(const Operator* const)
V8_WARN_UNUSED_RESULT;
const ParameterInfo& ParameterInfoOf(const Operator* const)
V8_WARN_UNUSED_RESULT;
struct ObjectStateInfo final : std::pair<uint32_t, int> { … };
std::ostream& operator<<(std::ostream&, ObjectStateInfo const&);
size_t hash_value(ObjectStateInfo const& p);
struct TypedObjectStateInfo final
: std::pair<uint32_t, const ZoneVector<MachineType>*> { … };
std::ostream& operator<<(std::ostream&, TypedObjectStateInfo const&);
size_t hash_value(TypedObjectStateInfo const& p);
class RelocatablePtrConstantInfo final { … };
bool operator==(RelocatablePtrConstantInfo const& lhs,
RelocatablePtrConstantInfo const& rhs);
bool operator!=(RelocatablePtrConstantInfo const& lhs,
RelocatablePtrConstantInfo const& rhs);
std::ostream& operator<<(std::ostream&, RelocatablePtrConstantInfo const&);
size_t hash_value(RelocatablePtrConstantInfo const& p);
class SparseInputMask final { … };
bool operator==(SparseInputMask const& lhs, SparseInputMask const& rhs);
bool operator!=(SparseInputMask const& lhs, SparseInputMask const& rhs);
class TypedStateValueInfo final { … };
bool operator==(TypedStateValueInfo const& lhs, TypedStateValueInfo const& rhs);
bool operator!=(TypedStateValueInfo const& lhs, TypedStateValueInfo const& rhs);
std::ostream& operator<<(std::ostream&, TypedStateValueInfo const&);
size_t hash_value(TypedStateValueInfo const& p);
enum class RegionObservability : uint8_t { … };
size_t hash_value(RegionObservability);
std::ostream& operator<<(std::ostream&, RegionObservability);
RegionObservability RegionObservabilityOf(Operator const*)
V8_WARN_UNUSED_RESULT;
std::ostream& operator<<(std::ostream& os,
const ZoneVector<MachineType>* types);
Type TypeGuardTypeOf(Operator const*) V8_WARN_UNUSED_RESULT;
int OsrValueIndexOf(Operator const*) V8_WARN_UNUSED_RESULT;
SparseInputMask SparseInputMaskOf(Operator const*) V8_WARN_UNUSED_RESULT;
ZoneVector<MachineType> const* MachineTypesOf(Operator const*)
V8_WARN_UNUSED_RESULT;
ArgumentsStateType;
ArgumentsStateType ArgumentsStateTypeOf(Operator const*) V8_WARN_UNUSED_RESULT;
uint32_t ObjectIdOf(Operator const*);
MachineRepresentation DeadValueRepresentationOf(Operator const*)
V8_WARN_UNUSED_RESULT;
class IfValueParameters final { … };
V8_EXPORT_PRIVATE bool operator==(IfValueParameters const&,
IfValueParameters const&);
size_t hash_value(IfValueParameters const&);
V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&,
IfValueParameters const&);
V8_EXPORT_PRIVATE IfValueParameters const& IfValueParametersOf(
const Operator* op) V8_WARN_UNUSED_RESULT;
const FrameStateInfo& FrameStateInfoOf(const Operator* op)
V8_WARN_UNUSED_RESULT;
V8_EXPORT_PRIVATE Handle<HeapObject> HeapConstantOf(const Operator* op)
V8_WARN_UNUSED_RESULT;
const char* StaticAssertSourceOf(const Operator* op);
class SLVerifierHintParameters final { … };
V8_EXPORT_PRIVATE bool operator==(const SLVerifierHintParameters& p1,
const SLVerifierHintParameters& p2);
size_t hash_value(const SLVerifierHintParameters& p);
V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& out,
const SLVerifierHintParameters& p);
V8_EXPORT_PRIVATE const SLVerifierHintParameters& SLVerifierHintParametersOf(
const Operator* op) V8_WARN_UNUSED_RESULT;
class ExitMachineGraphParameters final { … };
V8_EXPORT_PRIVATE bool operator==(const ExitMachineGraphParameters& lhs,
const ExitMachineGraphParameters& rhs);
size_t hash_value(const ExitMachineGraphParameters& p);
V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
const ExitMachineGraphParameters& p);
V8_EXPORT_PRIVATE const ExitMachineGraphParameters&
ExitMachineGraphParametersOf(const Operator* op) V8_WARN_UNUSED_RESULT;
class V8_EXPORT_PRIVATE CommonOperatorBuilder final
: public NON_EXPORTED_BASE(ZoneObject) { … };
class CommonNodeWrapperBase : public NodeWrapper { … };
#define DEFINE_INPUT_ACCESSORS …
class FrameState : public CommonNodeWrapperBase { … };
class StartNode final : public CommonNodeWrapperBase { … };
#undef DEFINE_INPUT_ACCESSORS
}
}
}
#endif