v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
wasm-subtyping.cc File Reference
Include dependency graph for wasm-subtyping.cc:

Go to the source code of this file.

Namespaces

namespace  v8
 
namespace  v8::internal
 
namespace  v8::internal::wasm
 

Macros

#define FOREACH_SUBTYPING(V)
 
#define ENTRY(name, ...)
 
#define CASE(sub, super)
 
#define CASE(name, ...)
 
#define ENTRY(name, ...)
 
#define BAILOUT(name, ...)
 
#define CASE(name, ...)
 
#define CASE(name, ...)
 
#define CASE(a, b)
 
#define CASE(a, b)
 
#define NULLTYPE(name, ...)
 

Functions

bool v8::internal::wasm::ValidSubtypeDefinition (ModuleTypeIndex subtype_index, ModuleTypeIndex supertype_index, const WasmModule *sub_module, const WasmModule *super_module)
 
V8_NOINLINE V8_EXPORT_PRIVATE bool v8::internal::wasm::IsSubtypeOfImpl (HeapType subtype, HeapType supertype, const WasmModule *sub_module, const WasmModule *super_module)
 
V8_NOINLINE V8_EXPORT_PRIVATE bool v8::internal::wasm::IsSubtypeOfImpl (ValueType subtype, ValueType supertype, const WasmModule *sub_module, const WasmModule *super_module)
 
V8_NOINLINE V8_EXPORT_PRIVATE bool v8::internal::wasm::IsSubtypeOfImpl (CanonicalValueType subtype, CanonicalValueType supertype)
 
V8_NOINLINE bool v8::internal::wasm::EquivalentTypes (ValueType type1, ValueType type2, const WasmModule *module1, const WasmModule *module2)
 
V8_EXPORT_PRIVATE TypeInModule v8::internal::wasm::Union (ValueType type1, ValueType type2, const WasmModule *module1, const WasmModule *module2)
 
TypeInModule v8::internal::wasm::Intersection (ValueType type1, ValueType type2, const WasmModule *module1, const WasmModule *module2)
 
ValueType v8::internal::wasm::ToNullSentinel (TypeInModule type)
 
bool v8::internal::wasm::IsSameTypeHierarchy (HeapType type1, HeapType type2, const WasmModule *module)
 

Macro Definition Documentation

◆ BAILOUT

#define BAILOUT ( name,
... )
Value:
case StandardType::k##name:
const char * name
Definition builtins.cc:39

◆ CASE [1/6]

#define CASE ( a,
b )
Value:
{ \
size_t raw_a = static_cast<size_t>(CondensedIndices::k##a); \
size_t raw_b = static_cast<size_t>(CondensedIndices::k##b); \
if (sub == raw_a) { \
if (super == raw_b) return true; \
if (ComputeIsSubtype(raw_b, super)) return true; \
} \
}
std::optional< TNode< JSArray > > a

◆ CASE [2/6]

#define CASE ( a,
b )
Value:
if (t1 == static_cast<size_t>(CondensedIndices::k##a)) { \
return ComputeCommonAncestor(static_cast<size_t>(CondensedIndices::k##b), \
t2); \
}

◆ CASE [3/6]

#define CASE ( name,
... )
Value:
(NotInSubtypeRelation(StandardType::k##name) ? 0 : 1) +

◆ CASE [4/6]

#define CASE ( name,
... )
Value:
case StandardType::k##name: \
if (NotInSubtypeRelation(type)) return kNotRelatedSentinel; \
return static_cast<uint8_t>(CondensedIndices::k##name);

◆ CASE [5/6]

#define CASE ( name,
... )
Value:
if (ComputeCondensedIndex(StandardType::k##name) == condensed_index) \
return StandardType::k##name;

◆ CASE [6/6]

#define CASE ( sub,
super )
Value:
if (type == StandardType::k##sub || type == StandardType::k##super) return 0;

◆ ENTRY [1/2]

#define ENTRY ( name,
... )
Value:
if (static_cast<size_t>(StandardType::k##name) == i) { \
return GenericKind::k##name; \
}

Definition at line 212 of file wasm-subtyping.cc.

◆ ENTRY [2/2]

#define ENTRY ( name,
... )
Value:
k##name, \
k##name##AdjustNext = \
k##name - NotInSubtypeRelation(StandardType::k##name),

Definition at line 212 of file wasm-subtyping.cc.

◆ FOREACH_SUBTYPING

#define FOREACH_SUBTYPING ( V)
Value:
/* force 80 cols */ \
/* anyref hierarchy */ \
V(Eq, Any) \
V(Struct, Eq) \
V(None, Struct) \
V(Array, Eq) \
V(None, Array) \
V(I31, Eq) \
V(None, I31) \
V(String, Any) \
V(None, String) \
/* funcref hierarchy */ \
V(NoFunc, Func) \
/* extern hierarchy */ \
V(ExternString, Extern) \
V(NoExtern, ExternString) \
/* exnref hierarchy */ \
V(NoExn, Exn) \
/* cont hierarchy */ \
V(NoCont, Cont)

Definition at line 149 of file wasm-subtyping.cc.

◆ NULLTYPE

#define NULLTYPE ( name,
... )
Value:
StandardType::k##name,