/third_party/node/deps/v8/src/wasm/ |
H A D | wasm-subtyping.h | 21 ValueType subtype, ValueType supertype, const WasmModule* sub_module, 38 // Checks if {subtype}, defined in {module1}, is a subtype of {supertype}, 59 // transitively an explicit canonical supertype of h1. 60 V8_INLINE bool IsSubtypeOf(ValueType subtype, ValueType supertype, in IsSubtypeOf() argument 63 if (subtype == supertype && sub_module == super_module) return true; in IsSubtypeOf() 64 return IsSubtypeOfImpl(subtype, supertype, sub_module, super_module); in IsSubtypeOf() 67 // Checks if {subtype} is a subtype of {supertype} (both defined in {module}). 68 V8_INLINE bool IsSubtypeOf(ValueType subtype, ValueType supertype, in IsSubtypeOf() argument 71 if (V8_LIKELY(subtype == supertype)) return true; in IsSubtypeOf() 72 return IsSubtypeOfImpl(subtype, supertype, modul in IsSubtypeOf() 77 IsHeapSubtypeOf(HeapType::Representation subtype, HeapType::Representation supertype, const WasmModule* module) IsHeapSubtypeOf() argument [all...] |
H A D | wasm-module.h | 347 // Used as the supertype for a type at the top of the type hierarchy. 353 TypeDefinition(const FunctionSig* sig, uint32_t supertype) in TypeDefinition() 354 : function_sig(sig), supertype(supertype), kind(kFunction) {} in TypeDefinition() 355 TypeDefinition(const StructType* type, uint32_t supertype) in TypeDefinition() 356 : struct_type(type), supertype(supertype), kind(kStruct) {} in TypeDefinition() 357 TypeDefinition(const ArrayType* type, uint32_t supertype) in TypeDefinition() 358 : array_type(type), supertype(supertype), kin in TypeDefinition() 386 uint32_t supertype; global() member 489 uint32_t supertype(uint32_t index) const { supertype() function [all...] |
H A D | wasm-subtyping.cc | 126 ValueType subtype, ValueType supertype, const WasmModule* sub_module, in IsSubtypeOfImpl() 128 DCHECK(subtype != supertype || sub_module != super_module); in IsSubtypeOfImpl() 140 return subtype == supertype; in IsSubtypeOfImpl() 142 return supertype.kind() == kRtt && in IsSubtypeOfImpl() 143 EquivalentIndices(subtype.ref_index(), supertype.ref_index(), in IsSubtypeOfImpl() 153 ? supertype.is_nullable() in IsSubtypeOfImpl() 154 : supertype.is_object_reference(); in IsSubtypeOfImpl() 157 DCHECK(supertype.is_object_reference()); in IsSubtypeOfImpl() 162 HeapType super_heap = supertype.heap_type(); in IsSubtypeOfImpl() 219 uint32_t explicit_super = sub_module->supertype(sub_inde in IsSubtypeOfImpl() 125 IsSubtypeOfImpl( ValueType subtype, ValueType supertype, const WasmModule* sub_module, const WasmModule* super_module) IsSubtypeOfImpl() argument [all...] |
H A D | canonical-types.cc | 45 // Compute the canonical index of the supertype: If it is relative, we in AddRecursiveGroup() 49 ? canonical_type.type_def.supertype + first_canonical_index in AddRecursiveGroup() 50 : canonical_type.type_def.supertype; in AddRecursiveGroup() 91 // Map all type indices (including supertype) inside {type} to indices relative 98 if (type.supertype < recursive_group_start) { in CanonicalizeTypeDef() 100 module->isorecursive_canonical_type_ids[type.supertype]; in CanonicalizeTypeDef() 101 } else if (type.supertype != kNoSuperType) { in CanonicalizeTypeDef() 102 canonical_supertype = type.supertype - recursive_group_start; in CanonicalizeTypeDef()
|
H A D | wasm-module-builder.cc | 308 uint32_t supertype) { in ForceAddSignature() 311 types_.emplace_back(sig, supertype); in ForceAddSignature() 316 uint32_t supertype) { in AddSignature() 319 return ForceAddSignature(sig, supertype); in AddSignature() 331 uint32_t supertype) { in AddStructType() 333 types_.emplace_back(type, supertype); in AddStructType() 337 uint32_t WasmModuleBuilder::AddArrayType(ArrayType* type, uint32_t supertype) { in AddArrayType() argument 339 types_.emplace_back(type, supertype); in AddArrayType() 616 if (type.supertype != kNoSuperType) { in WriteTo() 618 buffer->write_u8(1); // The supertype coun in WriteTo() 307 ForceAddSignature(const FunctionSig* sig, uint32_t supertype) ForceAddSignature() argument 315 AddSignature(const FunctionSig* sig, uint32_t supertype) AddSignature() argument 330 AddStructType(StructType* type, uint32_t supertype) AddStructType() argument [all...] |
H A D | wasm-module-builder.h | 338 uint32_t supertype = kNoSuperType); 341 uint32_t supertype = kNoSuperType); 343 uint32_t AddStructType(StructType* type, uint32_t supertype = kNoSuperType); 344 uint32_t AddArrayType(ArrayType* type, uint32_t supertype = kNoSuperType);
|
H A D | module-decoder.cc | 586 bool check_supertype(uint32_t supertype) { in check_supertype() argument 587 if (V8_UNLIKELY(supertype >= module_->types.size())) { in check_supertype() 588 errorf(pc(), "type %zu: forward-declared supertype %d", in check_supertype() 589 module_->types.size(), supertype); in check_supertype() local 607 errorf(pc() - 1, "type %zu: invalid supertype %d", num_types, in consume_nominal_type_definition() 620 errorf(pc() - 1, "type %zu: invalid supertype %d", num_types, in consume_nominal_type_definition() 633 errorf(pc() - 1, "type %zu: invalid supertype %d", num_types, in consume_nominal_type_definition() 660 consume_count("supertype count", kMaximumSupertypes); in consume_subtype_definition() 661 uint32_t supertype = in consume_subtype_definition() local 662 supertype_count == 1 ? consume_u32v("supertype") in consume_subtype_definition() [all...] |
H A D | module-instantiate.cc | 237 // If the type with {type_index} has an explicit supertype, make sure the in CreateMapForType() 238 // map for that supertype is created first, so that the supertypes list in CreateMapForType() 240 uint32_t supertype = module->supertype(type_index); in CreateMapForType() local 241 if (supertype != kNoSuperType) { in CreateMapForType() 244 CreateMapForType(isolate, module, supertype, instance, maps); in CreateMapForType() 245 rtt_parent = handle(Map::cast(maps->get(supertype)), isolate); in CreateMapForType()
|
H A D | wasm-module.cc | 122 while ((type_index = module->supertype(type_index)) != kNoSuperType) { in GetSubtypingDepth()
|
/third_party/node/deps/v8/src/torque/ |
H A D | instructions.cc | 30 void ExpectSubtype(const Type* subtype, const Type* supertype) { in ExpectSubtype() argument 31 if (!subtype->IsSubtypeOf(supertype)) { in ExpectSubtype() 32 ReportError("type ", *subtype, " is not a subtype of ", *supertype); in ExpectSubtype()
|
H A D | types.cc | 90 bool Type::IsSubtypeOf(const Type* supertype) const { in IsSubtypeOf() 91 if (supertype->IsTopType()) return true; in IsSubtypeOf() 93 if (const UnionType* union_type = UnionType::DynamicCast(supertype)) { in IsSubtypeOf() 98 if (subtype == supertype) return true; in IsSubtypeOf() 153 " have no common supertype"); in CommonSupertype()
|
H A D | types.h | 110 virtual bool IsSubtypeOf(const Type* supertype) const;
|