v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::torque::Type Class Referenceabstract

#include <types.h>

Inheritance diagram for v8::internal::torque::Type:
Collaboration diagram for v8::internal::torque::Type:

Public Types

enum class  HandleKind { kIndirect , kDirect }
 
- Public Types inherited from v8::internal::torque::TypeBase
enum class  Kind {
  kTopType , kAbstractType , kBuiltinPointerType , kUnionType ,
  kBitFieldStructType , kStructType , kClassType
}
 

Public Member Functions

Typeoperator= (const Type &other)=delete
 
virtual bool IsSubtypeOf (const Type *supertype) const
 
std::string ToString () const
 
virtual std::string SimpleName () const
 
std::string GetHandleTypeName (HandleKind kind, const std::string &type_name) const
 
std::string TagglifiedCppTypeName () const
 
std::string HandlifiedCppTypeName (HandleKind kind) const
 
const Typeparent () const
 
bool IsVoid () const
 
bool IsNever () const
 
bool IsBool () const
 
bool IsConstexprBool () const
 
bool IsVoidOrNever () const
 
bool IsFloat32 () const
 
bool IsFloat64 () const
 
std::string GetGeneratedTypeName () const
 
std::string GetGeneratedTNodeTypeName () const
 
virtual bool IsConstexpr () const
 
virtual bool IsTransient () const
 
virtual const TypeNonConstexprVersion () const
 
virtual std::string GetConstexprGeneratedTypeName () const
 
std::optional< const ClassType * > ClassSupertype () const
 
std::optional< const StructType * > StructSupertype () const
 
std::optional< const AggregateType * > AggregateSupertype () const
 
virtual std::vector< TypeCheckerGetTypeCheckers () const
 
virtual std::string GetRuntimeType () const
 
virtual std::string GetDebugType () const
 
void AddAlias (std::string alias) const
 
size_t id () const
 
const MaybeSpecializationKeyGetSpecializedFrom () const
 
virtual void SetConstexprVersion (const Type *type) const
 
virtual const TypeConstexprVersion () const
 
virtual size_t AlignmentLog2 () const
 
- Public Member Functions inherited from v8::internal::torque::TypeBase
virtual ~TypeBase ()=default
 
bool IsTopType () const
 
bool IsAbstractType () const
 
bool IsBuiltinPointerType () const
 
bool IsUnionType () const
 
bool IsBitFieldStructType () const
 
bool IsStructType () const
 
bool IsClassType () const
 
bool IsAggregateType () const
 

Static Public Member Functions

static const TypeCommonSupertype (const Type *a, const Type *b)
 
static std::optional< const Type * > MatchUnaryGeneric (const Type *type, GenericType *generic)
 
static std::string ComputeName (const std::string &basename, MaybeSpecializationKey specialized_from)
 

Protected Member Functions

 Type (TypeBase::Kind kind, const Type *parent, MaybeSpecializationKey specialized_from=std::nullopt)
 
 Type (const Type &other) V8_NOEXCEPT
 
void set_parent (const Type *t)
 
int Depth () const
 
virtual std::string ToExplicitString () const =0
 
virtual std::string GetGeneratedTypeNameImpl () const =0
 
virtual std::string GetGeneratedTNodeTypeNameImpl () const =0
 
virtual std::string SimpleNameImpl () const =0
 
- Protected Member Functions inherited from v8::internal::torque::TypeBase
 TypeBase (Kind kind)
 
Kind kind () const
 

Private Member Functions

bool IsAbstractName (const std::string &name) const
 

Private Attributes

const Typeparent_
 
std::set< std::string > aliases_
 
size_t id_
 
MaybeSpecializationKey specialized_from_
 
const Typeconstexpr_version_ = nullptr
 

Detailed Description

Definition at line 105 of file types.h.

Member Enumeration Documentation

◆ HandleKind

Enumerator
kIndirect 
kDirect 

Definition at line 117 of file types.h.

Constructor & Destructor Documentation

◆ Type() [1/2]

v8::internal::torque::Type::Type ( TypeBase::Kind kind,
const Type * parent,
MaybeSpecializationKey specialized_from = std::nullopt )
protected

Definition at line 29 of file types.cc.

◆ Type() [2/2]

v8::internal::torque::Type::Type ( const Type & other)
protected

Definition at line 23 of file types.cc.

Member Function Documentation

◆ AddAlias()

void v8::internal::torque::Type::AddAlias ( std::string alias) const
inline

Definition at line 150 of file types.h.

◆ AggregateSupertype()

std::optional< const AggregateType * > v8::internal::torque::Type::AggregateSupertype ( ) const

Definition at line 142 of file types.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AlignmentLog2()

size_t v8::internal::torque::Type::AlignmentLog2 ( ) const
virtual

Reimplemented in v8::internal::torque::AbstractType, and v8::internal::torque::StructType.

Definition at line 1259 of file types.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ClassSupertype()

std::optional< const ClassType * > v8::internal::torque::Type::ClassSupertype ( ) const

Definition at line 124 of file types.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CommonSupertype()

const Type * v8::internal::torque::Type::CommonSupertype ( const Type * a,
const Type * b )
static

Definition at line 152 of file types.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeName()

std::string v8::internal::torque::Type::ComputeName ( const std::string & basename,
MaybeSpecializationKey specialized_from )
static

Definition at line 547 of file types.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConstexprVersion()

virtual const Type * v8::internal::torque::Type::ConstexprVersion ( ) const
inlinevirtual

Reimplemented in v8::internal::torque::BitFieldStructType.

Definition at line 165 of file types.h.

Here is the caller graph for this function:

◆ Depth()

int v8::internal::torque::Type::Depth ( ) const
protected

Definition at line 167 of file types.cc.

Here is the caller graph for this function:

◆ GetConstexprGeneratedTypeName()

std::string v8::internal::torque::Type::GetConstexprGeneratedTypeName ( ) const
virtual

Reimplemented in v8::internal::torque::UnionType.

Definition at line 115 of file types.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDebugType()

std::string v8::internal::torque::Type::GetDebugType ( ) const
virtual

Reimplemented in v8::internal::torque::UnionType.

Definition at line 1464 of file types.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetGeneratedTNodeTypeName()

std::string v8::internal::torque::Type::GetGeneratedTNodeTypeName ( ) const

Definition at line 189 of file types.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetGeneratedTNodeTypeNameImpl()

virtual std::string v8::internal::torque::Type::GetGeneratedTNodeTypeNameImpl ( ) const
protectedpure virtual

Implemented in v8::internal::torque::AbstractType, v8::internal::torque::AggregateType, v8::internal::torque::BitFieldStructType, v8::internal::torque::BuiltinPointerType, v8::internal::torque::ClassType, v8::internal::torque::TopType, and v8::internal::torque::UnionType.

Here is the caller graph for this function:

◆ GetGeneratedTypeName()

std::string v8::internal::torque::Type::GetGeneratedTypeName ( ) const

Definition at line 180 of file types.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetGeneratedTypeNameImpl()

virtual std::string v8::internal::torque::Type::GetGeneratedTypeNameImpl ( ) const
protectedpure virtual

◆ GetHandleTypeName()

std::string v8::internal::torque::Type::GetHandleTypeName ( HandleKind kind,
const std::string & type_name ) const

Definition at line 71 of file types.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetRuntimeType()

std::string v8::internal::torque::Type::GetRuntimeType ( ) const
virtual

Reimplemented in v8::internal::torque::UnionType.

Definition at line 1444 of file types.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSpecializedFrom()

const MaybeSpecializationKey & v8::internal::torque::Type::GetSpecializedFrom ( ) const
inline

Definition at line 152 of file types.h.

Here is the caller graph for this function:

◆ GetTypeCheckers()

virtual std::vector< TypeChecker > v8::internal::torque::Type::GetTypeCheckers ( ) const
inlinevirtual

◆ HandlifiedCppTypeName()

std::string v8::internal::torque::Type::HandlifiedCppTypeName ( HandleKind kind) const

Definition at line 83 of file types.cc.

Here is the call graph for this function:

◆ id()

size_t v8::internal::torque::Type::id ( ) const
inline

Definition at line 151 of file types.h.

Here is the caller graph for this function:

◆ IsAbstractName()

bool v8::internal::torque::Type::IsAbstractName ( const std::string & name) const
private

Definition at line 175 of file types.cc.

Here is the call graph for this function:

◆ IsBool()

bool v8::internal::torque::Type::IsBool ( ) const
inline

Definition at line 127 of file types.h.

◆ IsConstexpr()

virtual bool v8::internal::torque::Type::IsConstexpr ( ) const
inlinevirtual

Reimplemented in v8::internal::torque::AbstractType, and v8::internal::torque::UnionType.

Definition at line 136 of file types.h.

Here is the caller graph for this function:

◆ IsConstexprBool()

bool v8::internal::torque::Type::IsConstexprBool ( ) const
inline

Definition at line 128 of file types.h.

◆ IsFloat32()

bool v8::internal::torque::Type::IsFloat32 ( ) const
inline

Definition at line 132 of file types.h.

Here is the caller graph for this function:

◆ IsFloat64()

bool v8::internal::torque::Type::IsFloat64 ( ) const
inline

Definition at line 133 of file types.h.

Here is the caller graph for this function:

◆ IsNever()

bool v8::internal::torque::Type::IsNever ( ) const
inline

Definition at line 126 of file types.h.

Here is the caller graph for this function:

◆ IsSubtypeOf()

bool v8::internal::torque::Type::IsSubtypeOf ( const Type * supertype) const
virtual

Reimplemented in v8::internal::torque::UnionType.

Definition at line 101 of file types.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsTransient()

virtual bool v8::internal::torque::Type::IsTransient ( ) const
inlinevirtual

◆ IsVoid()

bool v8::internal::torque::Type::IsVoid ( ) const
inline

Definition at line 125 of file types.h.

Here is the caller graph for this function:

◆ IsVoidOrNever()

bool v8::internal::torque::Type::IsVoidOrNever ( ) const
inline

Definition at line 131 of file types.h.

◆ MatchUnaryGeneric()

std::optional< const Type * > v8::internal::torque::Type::MatchUnaryGeneric ( const Type * type,
GenericType * generic )
static

Definition at line 573 of file types.cc.

Here is the caller graph for this function:

◆ NonConstexprVersion()

virtual const Type * v8::internal::torque::Type::NonConstexprVersion ( ) const
inlinevirtual

Reimplemented in v8::internal::torque::AbstractType, and v8::internal::torque::UnionType.

Definition at line 141 of file types.h.

Here is the caller graph for this function:

◆ operator=()

Type & v8::internal::torque::Type::operator= ( const Type & other)
delete

◆ parent()

const Type * v8::internal::torque::Type::parent ( ) const
inline

Definition at line 124 of file types.h.

Here is the caller graph for this function:

◆ set_parent()

void v8::internal::torque::Type::set_parent ( const Type * t)
inlineprotected

Definition at line 178 of file types.h.

Here is the caller graph for this function:

◆ SetConstexprVersion()

virtual void v8::internal::torque::Type::SetConstexprVersion ( const Type * type) const
inlinevirtual

Reimplemented in v8::internal::torque::BitFieldStructType.

Definition at line 161 of file types.h.

Here is the caller graph for this function:

◆ SimpleName()

std::string v8::internal::torque::Type::SimpleName ( ) const
virtual

Definition at line 57 of file types.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SimpleNameImpl()

virtual std::string v8::internal::torque::Type::SimpleNameImpl ( ) const
protectedpure virtual

Implemented in v8::internal::torque::AbstractType, v8::internal::torque::AggregateType, v8::internal::torque::BitFieldStructType, v8::internal::torque::BuiltinPointerType, v8::internal::torque::StructType, v8::internal::torque::TopType, and v8::internal::torque::UnionType.

Here is the caller graph for this function:

◆ StructSupertype()

std::optional< const StructType * > v8::internal::torque::Type::StructSupertype ( ) const

Definition at line 133 of file types.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TagglifiedCppTypeName()

std::string v8::internal::torque::Type::TagglifiedCppTypeName ( ) const

Definition at line 92 of file types.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ToExplicitString()

virtual std::string v8::internal::torque::Type::ToExplicitString ( ) const
protectedpure virtual

Implemented in v8::internal::torque::AbstractType, v8::internal::torque::BitFieldStructType, v8::internal::torque::BuiltinPointerType, v8::internal::torque::ClassType, v8::internal::torque::StructType, v8::internal::torque::TopType, and v8::internal::torque::UnionType.

Here is the caller graph for this function:

◆ ToString()

std::string v8::internal::torque::Type::ToString ( ) const

Definition at line 37 of file types.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ aliases_

std::set<std::string> v8::internal::torque::Type::aliases_
mutableprivate

Definition at line 190 of file types.h.

◆ constexpr_version_

const Type* v8::internal::torque::Type::constexpr_version_ = nullptr
mutableprivate

Definition at line 193 of file types.h.

◆ id_

size_t v8::internal::torque::Type::id_
private

Definition at line 191 of file types.h.

◆ parent_

const Type* v8::internal::torque::Type::parent_
private

Definition at line 189 of file types.h.

◆ specialized_from_

MaybeSpecializationKey v8::internal::torque::Type::specialized_from_
private

Definition at line 192 of file types.h.


The documentation for this class was generated from the following files: