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

#include <types.h>

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

Public Member Functions

std::string ToExplicitString () const override
 
std::string GetGeneratedTypeNameImpl () const override
 
std::string GetGeneratedTNodeTypeNameImpl () const override
 
bool IsExtern () const
 
bool ShouldGeneratePrint () const
 
bool ShouldGenerateVerify () const
 
bool ShouldGenerateBodyDescriptor () const
 
bool DoNotGenerateCast () const
 
bool IsTransient () const override
 
bool IsAbstract () const
 
bool IsLayoutDefinedInCpp () const
 
bool HasSameInstanceTypeAsParent () const
 
bool ShouldGenerateCppClassDefinitions () const
 
bool ShouldGenerateCppObjectDefinitionAsserts () const
 
bool ShouldGenerateCppObjectLayoutDefinitionAsserts () const
 
bool ShouldGenerateFullClassDefinition () const
 
bool ShouldGenerateUniqueMap () const
 
bool ShouldGenerateFactoryFunction () const
 
bool ShouldExport () const
 
bool IsShape () const
 
bool HasStaticSize () const
 
size_t header_size () const
 
ResidueClass size () const
 
const ClassTypeGetSuperClass () const
 
void GenerateAccessors ()
 
bool AllowInstantiation () const
 
const FieldRegisterField (Field field) override
 
void Finalize () const override
 
std::vector< FieldComputeAllFields () const
 
std::vector< FieldComputeHeaderFields () const
 
std::vector< FieldComputeArrayFields () const
 
std::vector< ObjectSlotKindComputeHeaderSlotKinds () const
 
std::optional< ObjectSlotKindComputeArraySlotKind () const
 
bool HasNoPointerSlotsExceptMap () const
 
bool HasIndexedFieldsIncludingInParents () const
 
const FieldGetFieldPreceding (size_t field_index) const
 
const ClassTypeGetClassDeclaringField (const Field &f) const
 
std::string GetSliceMacroName (const Field &field) const
 
const InstanceTypeConstraintsGetInstanceTypeConstraints () const
 
bool IsHighestInstanceTypeWithinParent () const
 
bool IsLowestInstanceTypeWithinParent () const
 
bool HasUndefinedLayout () const
 
SourcePosition GetPosition () const
 
SourceId AttributedToFile () const
 
void InitializeInstanceTypes (std::optional< int > own, std::optional< std::pair< int, int > > range) const
 
std::optional< int > OwnInstanceType () const
 
std::optional< std::pair< int, int > > InstanceTypeRange () const
 
- Public Member Functions inherited from v8::internal::torque::AggregateType
void SetFields (std::vector< Field > fields)
 
const std::vector< Field > & fields () const
 
bool HasField (const std::string &name) const
 
const FieldLookupField (const std::string &name) const
 
const std::string & name () const
 
Namespacenspace () const
 
void RegisterMethod (Method *method)
 
const std::vector< Method * > & Methods () const
 
std::vector< Method * > Methods (const std::string &name) const
 
std::vector< const AggregateType * > GetHierarchy () const
 
std::vector< TypeCheckerGetTypeCheckers () const override
 
const FieldLastField () const
 
- Public Member Functions inherited from v8::internal::torque::Type
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 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::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
 

Private Member Functions

 ClassType (const Type *parent, Namespace *nspace, const std::string &name, ClassFlags flags, const std::string &generates, const ClassDeclaration *decl, const TypeAlias *alias)
 
void GenerateSliceAccessor (size_t field_index)
 

Private Attributes

size_t header_size_
 
ResidueClass size_
 
ClassFlags flags_
 
const std::string generates_
 
const ClassDeclarationdecl_
 
const TypeAliasalias_
 
std::optional< int > own_instance_type_
 
std::optional< std::pair< int, int > > instance_type_range_
 

Friends

class TypeOracle
 
class TypeVisitor
 

Additional Inherited Members

- Public Types inherited from v8::internal::torque::Type
enum class  HandleKind { kIndirect , kDirect }
 
- Public Types inherited from v8::internal::torque::TypeBase
enum class  Kind {
  kTopType , kAbstractType , kBuiltinPointerType , kUnionType ,
  kBitFieldStructType , kStructType , kClassType
}
 
- Static Public Member Functions inherited from v8::internal::torque::Type
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 inherited from v8::internal::torque::AggregateType
 AggregateType (Kind kind, const Type *parent, Namespace *nspace, const std::string &name, MaybeSpecializationKey specialized_from=std::nullopt)
 
void CheckForDuplicateFields () const
 
const FieldLookupFieldInternal (const std::string &name) const
 
std::string SimpleNameImpl () const override
 
- Protected Member Functions inherited from v8::internal::torque::Type
 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
 
- Protected Member Functions inherited from v8::internal::torque::TypeBase
 TypeBase (Kind kind)
 
Kind kind () const
 
- Protected Attributes inherited from v8::internal::torque::AggregateType
bool is_finalized_
 
std::vector< Fieldfields_
 

Detailed Description

Definition at line 672 of file types.h.

Constructor & Destructor Documentation

◆ ClassType()

v8::internal::torque::ClassType::ClassType ( const Type * parent,
Namespace * nspace,
const std::string & name,
ClassFlags flags,
const std::string & generates,
const ClassDeclaration * decl,
const TypeAlias * alias )
private

Definition at line 612 of file types.cc.

Member Function Documentation

◆ AllowInstantiation()

bool v8::internal::torque::ClassType::AllowInstantiation ( ) const

Definition at line 634 of file types.cc.

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

◆ AttributedToFile()

SourceId v8::internal::torque::ClassType::AttributedToFile ( ) const

Definition at line 1052 of file types.cc.

Here is the call graph for this function:

◆ ComputeAllFields()

std::vector< Field > v8::internal::torque::ClassType::ComputeAllFields ( ) const

Definition at line 648 of file types.cc.

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

◆ ComputeArrayFields()

std::vector< Field > v8::internal::torque::ClassType::ComputeArrayFields ( ) const

Definition at line 671 of file types.cc.

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

◆ ComputeArraySlotKind()

std::optional< ObjectSlotKind > v8::internal::torque::ClassType::ComputeArraySlotKind ( ) const

Definition at line 757 of file types.cc.

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

◆ ComputeHeaderFields()

std::vector< Field > v8::internal::torque::ClassType::ComputeHeaderFields ( ) const

Definition at line 659 of file types.cc.

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

◆ ComputeHeaderSlotKinds()

std::vector< ObjectSlotKind > v8::internal::torque::ClassType::ComputeHeaderSlotKinds ( ) const

Definition at line 747 of file types.cc.

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

◆ DoNotGenerateCast()

bool v8::internal::torque::ClassType::DoNotGenerateCast ( ) const
inline

Definition at line 699 of file types.h.

◆ Finalize()

void v8::internal::torque::ClassType::Finalize ( ) const
overridevirtual

Implements v8::internal::torque::AggregateType.

Definition at line 638 of file types.cc.

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

◆ GenerateAccessors()

void v8::internal::torque::ClassType::GenerateAccessors ( )

Definition at line 818 of file types.cc.

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

◆ GenerateSliceAccessor()

void v8::internal::torque::ClassType::GenerateSliceAccessor ( size_t field_index)
private

Definition at line 915 of file types.cc.

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

◆ GetClassDeclaringField()

const ClassType * v8::internal::torque::ClassType::GetClassDeclaringField ( const Field & f) const

Definition at line 805 of file types.cc.

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

◆ GetFieldPreceding()

const Field * v8::internal::torque::ClassType::GetFieldPreceding ( size_t field_index) const

Definition at line 795 of file types.cc.

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

◆ GetGeneratedTNodeTypeNameImpl()

std::string v8::internal::torque::ClassType::GetGeneratedTNodeTypeNameImpl ( ) const
overridevirtual

Reimplemented from v8::internal::torque::AggregateType.

Definition at line 623 of file types.cc.

◆ GetGeneratedTypeNameImpl()

std::string v8::internal::torque::ClassType::GetGeneratedTypeNameImpl ( ) const
overridevirtual

Reimplemented from v8::internal::torque::AggregateType.

Definition at line 627 of file types.cc.

Here is the call graph for this function:

◆ GetInstanceTypeConstraints()

const InstanceTypeConstraints & v8::internal::torque::ClassType::GetInstanceTypeConstraints ( ) const
inline

Definition at line 771 of file types.h.

◆ GetPosition()

SourcePosition v8::internal::torque::ClassType::GetPosition ( ) const
inline

Definition at line 783 of file types.h.

Here is the caller graph for this function:

◆ GetSliceMacroName()

std::string v8::internal::torque::ClassType::GetSliceMacroName ( const Field & field) const

Definition at line 812 of file types.cc.

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

◆ GetSuperClass()

const ClassType * v8::internal::torque::ClassType::GetSuperClass ( ) const
inline

Definition at line 742 of file types.h.

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

◆ HasIndexedFieldsIncludingInParents()

bool v8::internal::torque::ClassType::HasIndexedFieldsIncludingInParents ( ) const

Definition at line 785 of file types.cc.

Here is the call graph for this function:

◆ HasNoPointerSlotsExceptMap()

bool v8::internal::torque::ClassType::HasNoPointerSlotsExceptMap ( ) const

Definition at line 771 of file types.cc.

Here is the call graph for this function:

◆ HasSameInstanceTypeAsParent()

bool v8::internal::torque::ClassType::HasSameInstanceTypeAsParent ( ) const
inline

Definition at line 707 of file types.h.

◆ HasStaticSize()

bool v8::internal::torque::ClassType::HasStaticSize ( ) const

Definition at line 1047 of file types.cc.

Here is the call graph for this function:

◆ HasUndefinedLayout()

bool v8::internal::torque::ClassType::HasUndefinedLayout ( ) const
inline

Definition at line 780 of file types.h.

Here is the caller graph for this function:

◆ header_size()

size_t v8::internal::torque::ClassType::header_size ( ) const
inline

Definition at line 734 of file types.h.

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

◆ InitializeInstanceTypes()

void v8::internal::torque::ClassType::InitializeInstanceTypes ( std::optional< int > own,
std::optional< std::pair< int, int > > range ) const

Definition at line 685 of file types.cc.

◆ InstanceTypeRange()

std::optional< std::pair< int, int > > v8::internal::torque::ClassType::InstanceTypeRange ( ) const

Definition at line 698 of file types.cc.

Here is the call graph for this function:

◆ IsAbstract()

bool v8::internal::torque::ClassType::IsAbstract ( ) const
inline

Definition at line 703 of file types.h.

Here is the caller graph for this function:

◆ IsExtern()

bool v8::internal::torque::ClassType::IsExtern ( ) const
inline

Definition at line 678 of file types.h.

Here is the caller graph for this function:

◆ IsHighestInstanceTypeWithinParent()

bool v8::internal::torque::ClassType::IsHighestInstanceTypeWithinParent ( ) const
inline

Definition at line 774 of file types.h.

◆ IsLayoutDefinedInCpp()

bool v8::internal::torque::ClassType::IsLayoutDefinedInCpp ( ) const
inline

Definition at line 704 of file types.h.

◆ IsLowestInstanceTypeWithinParent()

bool v8::internal::torque::ClassType::IsLowestInstanceTypeWithinParent ( ) const
inline

Definition at line 777 of file types.h.

◆ IsShape()

bool v8::internal::torque::ClassType::IsShape ( ) const
inline

Definition at line 732 of file types.h.

Here is the caller graph for this function:

◆ IsTransient()

bool v8::internal::torque::ClassType::IsTransient ( ) const
inlineoverridevirtual

Reimplemented from v8::internal::torque::Type.

Definition at line 702 of file types.h.

◆ OwnInstanceType()

std::optional< int > v8::internal::torque::ClassType::OwnInstanceType ( ) const

Definition at line 693 of file types.cc.

Here is the call graph for this function:

◆ RegisterField()

const Field & v8::internal::torque::ClassType::RegisterField ( Field field)
inlineoverridevirtual

Reimplemented from v8::internal::torque::AggregateType.

Definition at line 748 of file types.h.

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

◆ ShouldExport()

bool v8::internal::torque::ClassType::ShouldExport ( ) const
inline

Definition at line 731 of file types.h.

Here is the caller graph for this function:

◆ ShouldGenerateBodyDescriptor()

bool v8::internal::torque::ClassType::ShouldGenerateBodyDescriptor ( ) const
inline

Definition at line 693 of file types.h.

Here is the call graph for this function:

◆ ShouldGenerateCppClassDefinitions()

bool v8::internal::torque::ClassType::ShouldGenerateCppClassDefinitions ( ) const
inline

Definition at line 710 of file types.h.

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

◆ ShouldGenerateCppObjectDefinitionAsserts()

bool v8::internal::torque::ClassType::ShouldGenerateCppObjectDefinitionAsserts ( ) const
inline

Definition at line 715 of file types.h.

◆ ShouldGenerateCppObjectLayoutDefinitionAsserts()

bool v8::internal::torque::ClassType::ShouldGenerateCppObjectLayoutDefinitionAsserts ( ) const
inline

Definition at line 718 of file types.h.

Here is the caller graph for this function:

◆ ShouldGenerateFactoryFunction()

bool v8::internal::torque::ClassType::ShouldGenerateFactoryFunction ( ) const
inline

Definition at line 727 of file types.h.

Here is the call graph for this function:

◆ ShouldGenerateFullClassDefinition()

bool v8::internal::torque::ClassType::ShouldGenerateFullClassDefinition ( ) const
inline

Definition at line 722 of file types.h.

Here is the call graph for this function:

◆ ShouldGeneratePrint()

bool v8::internal::torque::ClassType::ShouldGeneratePrint ( ) const
inline

Definition at line 679 of file types.h.

Here is the call graph for this function:

◆ ShouldGenerateUniqueMap()

bool v8::internal::torque::ClassType::ShouldGenerateUniqueMap ( ) const
inline

Definition at line 723 of file types.h.

Here is the call graph for this function:

◆ ShouldGenerateVerify()

bool v8::internal::torque::ClassType::ShouldGenerateVerify ( ) const
inline

Definition at line 686 of file types.h.

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

◆ size()

ResidueClass v8::internal::torque::ClassType::size ( ) const
inline

Definition at line 738 of file types.h.

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

◆ ToExplicitString()

std::string v8::internal::torque::ClassType::ToExplicitString ( ) const
overridevirtual

Implements v8::internal::torque::Type.

Definition at line 632 of file types.cc.

Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ TypeOracle

friend class TypeOracle
friend

Definition at line 795 of file types.h.

◆ TypeVisitor

friend class TypeVisitor
friend

Definition at line 796 of file types.h.

Member Data Documentation

◆ alias_

const TypeAlias* v8::internal::torque::ClassType::alias_
private

Definition at line 808 of file types.h.

◆ decl_

const ClassDeclaration* v8::internal::torque::ClassType::decl_
private

Definition at line 807 of file types.h.

◆ flags_

ClassFlags v8::internal::torque::ClassType::flags_
mutableprivate

Definition at line 805 of file types.h.

◆ generates_

const std::string v8::internal::torque::ClassType::generates_
private

Definition at line 806 of file types.h.

◆ header_size_

size_t v8::internal::torque::ClassType::header_size_
private

Definition at line 803 of file types.h.

◆ instance_type_range_

std::optional<std::pair<int, int> > v8::internal::torque::ClassType::instance_type_range_
mutableprivate

Definition at line 810 of file types.h.

◆ own_instance_type_

std::optional<int> v8::internal::torque::ClassType::own_instance_type_
mutableprivate

Definition at line 809 of file types.h.

◆ size_

ResidueClass v8::internal::torque::ClassType::size_
private

Definition at line 804 of file types.h.


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