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

#include <canonical-types.h>

Collaboration diagram for v8::internal::wasm::TypeCanonicalizer:

Classes

struct  CanonicalEquality
 
struct  CanonicalGroup
 
struct  CanonicalHashing
 
struct  CanonicalSingletonGroup
 
struct  CanonicalType
 
class  CanonicalTypeVector
 
struct  RecursionGroupRange
 

Public Member Functions

 TypeCanonicalizer ()
 
 TypeCanonicalizer (const TypeCanonicalizer &other)=delete
 
TypeCanonicalizeroperator= (const TypeCanonicalizer &other)=delete
 
 TypeCanonicalizer (TypeCanonicalizer &&other)=delete
 
TypeCanonicalizeroperator= (TypeCanonicalizer &&other)=delete
 
V8_EXPORT_PRIVATE void AddRecursiveGroup (WasmModule *module, uint32_t size)
 
V8_EXPORT_PRIVATE void AddRecursiveSingletonGroup (WasmModule *module)
 
V8_EXPORT_PRIVATE CanonicalTypeIndex AddRecursiveGroup (const FunctionSig *sig)
 
V8_EXPORT_PRIVATE const CanonicalSigLookupFunctionSignature (CanonicalTypeIndex index) const
 
V8_EXPORT_PRIVATE const CanonicalStructTypeLookupStruct (CanonicalTypeIndex index) const
 
V8_EXPORT_PRIVATE const CanonicalArrayTypeLookupArray (CanonicalTypeIndex index) const
 
V8_EXPORT_PRIVATE bool IsCanonicalSubtype (CanonicalTypeIndex sub_index, CanonicalTypeIndex super_index)
 
V8_EXPORT_PRIVATE bool IsCanonicalSubtype (ModuleTypeIndex sub_index, ModuleTypeIndex super_index, const WasmModule *sub_module, const WasmModule *super_module)
 
V8_EXPORT_PRIVATE void EmptyStorageForTesting ()
 
size_t EstimateCurrentMemoryConsumption () const
 
V8_EXPORT_PRIVATE size_t GetCurrentNumberOfTypes () const
 
V8_EXPORT_PRIVATE bool IsFunctionSignature (CanonicalTypeIndex index) const
 
V8_EXPORT_PRIVATE bool IsStruct (CanonicalTypeIndex index) const
 
V8_EXPORT_PRIVATE bool IsArray (CanonicalTypeIndex index) const
 
bool IsHeapSubtype (CanonicalTypeIndex sub, CanonicalTypeIndex super) const
 
bool IsCanonicalSubtype_Locked (CanonicalTypeIndex sub_index, CanonicalTypeIndex super_index) const
 
CanonicalTypeIndex FindIndex_Slow (const CanonicalSig *sig) const
 

Static Public Member Functions

static V8_EXPORT_PRIVATE void PrepareForCanonicalTypeId (Isolate *isolate, CanonicalTypeIndex id)
 
static V8_EXPORT_PRIVATE void ClearWasmCanonicalTypesForTesting (Isolate *isolate)
 

Static Public Attributes

static constexpr CanonicalTypeIndex kPredefinedArrayI8Index {0}
 
static constexpr CanonicalTypeIndex kPredefinedArrayI16Index {1}
 
static constexpr uint32_t kNumberOfPredefinedTypes = 2
 

Private Member Functions

void AddPredefinedArrayTypes ()
 
CanonicalTypeIndex FindCanonicalGroup (const CanonicalGroup &) const
 
CanonicalTypeIndex FindCanonicalGroup (const CanonicalSingletonGroup &) const
 
CanonicalType CanonicalizeTypeDef (const WasmModule *module, ModuleTypeIndex module_type_idx, ModuleTypeIndex recgroup_start, CanonicalTypeIndex canonical_recgroup_start)
 
void CheckMaxCanonicalIndex () const
 

Private Attributes

std::vector< CanonicalTypeIndexcanonical_supertypes_
 
std::unordered_set< CanonicalGroupcanonical_groups_
 
std::unordered_set< CanonicalSingletonGroupcanonical_singleton_groups_
 
CanonicalTypeVector canonical_types_
 
AccountingAllocator allocator_
 
Zone zone_ {&allocator_, "canonical type zone"}
 
base::Mutex mutex_
 

Detailed Description

Definition at line 47 of file canonical-types.h.

Constructor & Destructor Documentation

◆ TypeCanonicalizer() [1/3]

v8::internal::wasm::TypeCanonicalizer::TypeCanonicalizer ( )

Definition at line 24 of file canonical-types.cc.

Here is the call graph for this function:

◆ TypeCanonicalizer() [2/3]

v8::internal::wasm::TypeCanonicalizer::TypeCanonicalizer ( const TypeCanonicalizer & other)
delete

◆ TypeCanonicalizer() [3/3]

v8::internal::wasm::TypeCanonicalizer::TypeCanonicalizer ( TypeCanonicalizer && other)
delete

Member Function Documentation

◆ AddPredefinedArrayTypes()

void v8::internal::wasm::TypeCanonicalizer::AddPredefinedArrayTypes ( )
private

Definition at line 211 of file canonical-types.cc.

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

◆ AddRecursiveGroup() [1/2]

CanonicalTypeIndex v8::internal::wasm::TypeCanonicalizer::AddRecursiveGroup ( const FunctionSig * sig)

Definition at line 132 of file canonical-types.cc.

Here is the call graph for this function:

◆ AddRecursiveGroup() [2/2]

void v8::internal::wasm::TypeCanonicalizer::AddRecursiveGroup ( WasmModule * module,
uint32_t size )

Definition at line 32 of file canonical-types.cc.

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

◆ AddRecursiveSingletonGroup()

void v8::internal::wasm::TypeCanonicalizer::AddRecursiveSingletonGroup ( WasmModule * module)

Definition at line 97 of file canonical-types.cc.

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

◆ CanonicalizeTypeDef()

TypeCanonicalizer::CanonicalType v8::internal::wasm::TypeCanonicalizer::CanonicalizeTypeDef ( const WasmModule * module,
ModuleTypeIndex module_type_idx,
ModuleTypeIndex recgroup_start,
CanonicalTypeIndex canonical_recgroup_start )
private

Definition at line 291 of file canonical-types.cc.

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

◆ CheckMaxCanonicalIndex()

void v8::internal::wasm::TypeCanonicalizer::CheckMaxCanonicalIndex ( ) const
private

Definition at line 26 of file canonical-types.cc.

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

◆ ClearWasmCanonicalTypesForTesting()

void v8::internal::wasm::TypeCanonicalizer::ClearWasmCanonicalTypesForTesting ( Isolate * isolate)
static

Definition at line 461 of file canonical-types.cc.

◆ EmptyStorageForTesting()

void v8::internal::wasm::TypeCanonicalizer::EmptyStorageForTesting ( )

Definition at line 277 of file canonical-types.cc.

Here is the call graph for this function:

◆ EstimateCurrentMemoryConsumption()

size_t v8::internal::wasm::TypeCanonicalizer::EstimateCurrentMemoryConsumption ( ) const

Definition at line 394 of file canonical-types.cc.

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

◆ FindCanonicalGroup() [1/2]

CanonicalTypeIndex v8::internal::wasm::TypeCanonicalizer::FindCanonicalGroup ( const CanonicalGroup & group) const
private

Definition at line 375 of file canonical-types.cc.

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

◆ FindCanonicalGroup() [2/2]

CanonicalTypeIndex v8::internal::wasm::TypeCanonicalizer::FindCanonicalGroup ( const CanonicalSingletonGroup & group) const
private

Definition at line 386 of file canonical-types.cc.

Here is the call graph for this function:

◆ FindIndex_Slow()

CanonicalTypeIndex v8::internal::wasm::TypeCanonicalizer::FindIndex_Slow ( const CanonicalSig * sig) const

Definition at line 477 of file canonical-types.cc.

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

◆ GetCurrentNumberOfTypes()

size_t v8::internal::wasm::TypeCanonicalizer::GetCurrentNumberOfTypes ( ) const

Definition at line 410 of file canonical-types.cc.

◆ IsArray()

bool v8::internal::wasm::TypeCanonicalizer::IsArray ( CanonicalTypeIndex index) const

Definition at line 473 of file canonical-types.cc.

◆ IsCanonicalSubtype() [1/2]

bool v8::internal::wasm::TypeCanonicalizer::IsCanonicalSubtype ( CanonicalTypeIndex sub_index,
CanonicalTypeIndex super_index )

Definition at line 236 of file canonical-types.cc.

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

◆ IsCanonicalSubtype() [2/2]

bool v8::internal::wasm::TypeCanonicalizer::IsCanonicalSubtype ( ModuleTypeIndex sub_index,
ModuleTypeIndex super_index,
const WasmModule * sub_module,
const WasmModule * super_module )

Definition at line 260 of file canonical-types.cc.

Here is the call graph for this function:

◆ IsCanonicalSubtype_Locked()

bool v8::internal::wasm::TypeCanonicalizer::IsCanonicalSubtype_Locked ( CanonicalTypeIndex sub_index,
CanonicalTypeIndex super_index ) const

Definition at line 247 of file canonical-types.cc.

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

◆ IsFunctionSignature()

bool v8::internal::wasm::TypeCanonicalizer::IsFunctionSignature ( CanonicalTypeIndex index) const

Definition at line 467 of file canonical-types.cc.

◆ IsHeapSubtype()

bool v8::internal::wasm::TypeCanonicalizer::IsHeapSubtype ( CanonicalTypeIndex sub,
CanonicalTypeIndex super ) const

Definition at line 270 of file canonical-types.cc.

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

◆ IsStruct()

bool v8::internal::wasm::TypeCanonicalizer::IsStruct ( CanonicalTypeIndex index) const

Definition at line 470 of file canonical-types.cc.

◆ LookupArray()

const CanonicalArrayType * v8::internal::wasm::TypeCanonicalizer::LookupArray ( CanonicalTypeIndex index) const

Definition at line 204 of file canonical-types.cc.

Here is the caller graph for this function:

◆ LookupFunctionSignature()

const CanonicalSig * v8::internal::wasm::TypeCanonicalizer::LookupFunctionSignature ( CanonicalTypeIndex index) const

Definition at line 190 of file canonical-types.cc.

Here is the caller graph for this function:

◆ LookupStruct()

const CanonicalStructType * v8::internal::wasm::TypeCanonicalizer::LookupStruct ( CanonicalTypeIndex index) const

Definition at line 197 of file canonical-types.cc.

Here is the caller graph for this function:

◆ operator=() [1/2]

TypeCanonicalizer & v8::internal::wasm::TypeCanonicalizer::operator= ( const TypeCanonicalizer & other)
delete

◆ operator=() [2/2]

TypeCanonicalizer & v8::internal::wasm::TypeCanonicalizer::operator= ( TypeCanonicalizer && other)
delete

◆ PrepareForCanonicalTypeId()

void v8::internal::wasm::TypeCanonicalizer::PrepareForCanonicalTypeId ( Isolate * isolate,
CanonicalTypeIndex id )
static

Definition at line 416 of file canonical-types.cc.

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

Member Data Documentation

◆ allocator_

AccountingAllocator v8::internal::wasm::TypeCanonicalizer::allocator_
private

Definition at line 564 of file canonical-types.h.

◆ canonical_groups_

std::unordered_set<CanonicalGroup> v8::internal::wasm::TypeCanonicalizer::canonical_groups_
private

Definition at line 559 of file canonical-types.h.

◆ canonical_singleton_groups_

std::unordered_set<CanonicalSingletonGroup> v8::internal::wasm::TypeCanonicalizer::canonical_singleton_groups_
private

Definition at line 561 of file canonical-types.h.

◆ canonical_supertypes_

std::vector<CanonicalTypeIndex> v8::internal::wasm::TypeCanonicalizer::canonical_supertypes_
private

Definition at line 557 of file canonical-types.h.

◆ canonical_types_

CanonicalTypeVector v8::internal::wasm::TypeCanonicalizer::canonical_types_
private

Definition at line 563 of file canonical-types.h.

◆ kNumberOfPredefinedTypes

uint32_t v8::internal::wasm::TypeCanonicalizer::kNumberOfPredefinedTypes = 2
staticconstexpr

Definition at line 51 of file canonical-types.h.

◆ kPredefinedArrayI16Index

CanonicalTypeIndex v8::internal::wasm::TypeCanonicalizer::kPredefinedArrayI16Index {1}
staticconstexpr

Definition at line 50 of file canonical-types.h.

◆ kPredefinedArrayI8Index

CanonicalTypeIndex v8::internal::wasm::TypeCanonicalizer::kPredefinedArrayI8Index {0}
staticconstexpr

Definition at line 49 of file canonical-types.h.

◆ mutex_

base::Mutex v8::internal::wasm::TypeCanonicalizer::mutex_
mutableprivate

Definition at line 566 of file canonical-types.h.

◆ zone_

Zone v8::internal::wasm::TypeCanonicalizer::zone_ {&allocator_, "canonical type zone"}
private

Definition at line 565 of file canonical-types.h.


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