/arkcompiler/ets_frontend/es2panda/typescript/types/ |
D | unionType.cpp | 113 Type *UnionType::HandleUnionType(UnionType *unionType, GlobalTypesHolder *globalTypesHolder) in HandleUnionType() argument 115 if (unionType->HasConstituentFlag(TypeFlag::ANY)) { in HandleUnionType() 119 if (unionType->HasConstituentFlag(TypeFlag::UNKNOWN)) { in HandleUnionType() 123 RemoveRedundantLiteralTypesFromUnion(unionType); in HandleUnionType() 125 if (unionType->ConstituentTypes().size() == 1) { in HandleUnionType() 126 return unionType->ConstituentTypes()[0]; in HandleUnionType() 129 return unionType; in HandleUnionType()
|
D | unionType.h | 122 static Type *HandleUnionType(UnionType *unionType, GlobalTypesHolder *globalTypesHolder);
|
/arkcompiler/ets_runtime/ecmascript/compiler/ |
D | object_access_helper.cpp | 95 JSHandle<TSUnionType> unionType(tsManager_->GetTSType(type_.GetGTRef())); in ComputePolymorphism() local 96 TaggedArray *components = TaggedArray::Cast(unionType->GetComponents().GetTaggedObject()); in ComputePolymorphism()
|
/arkcompiler/ets_frontend/ts2panda/src/ |
D | typeChecker.ts | 237 let unionType = new UnionType(typeNode); 238 return unionType.shiftedTypeIndex; 245 let unionType = new UnionType(subType); 246 return unionType.shiftedTypeIndex;
|
/arkcompiler/ets_runtime/ecmascript/ts_types/ |
D | ts_manager.cpp | 352 JSHandle<TSUnionType> unionType = JSHandle<TSUnionType>(tsType); in GetUnionTypeLength() local 353 JSHandle<TaggedArray> unionTypeArray(thread_, unionType->GetComponents()); in GetUnionTypeLength() 362 JSHandle<TSUnionType> unionType = JSHandle<TSUnionType>(tsType); in GetUnionTypeByIndex() local 363 JSHandle<TaggedArray> unionTypeArray(thread_, unionType->GetComponents()); in GetUnionTypeByIndex() 479 …TSManager::FindUnionInTypeTable(JSHandle<TSTypeTable> table, JSHandle<TSUnionType> unionType) const in FindUnionInTypeTable() 482 ASSERT(unionType.GetTaggedValue().IsTSUnionType()); in FindUnionInTypeTable() 491 if (uType->IsEqual(unionType)) { in FindUnionInTypeTable() 502 JSHandle<TSUnionType> unionType = factory_->NewTSUnionType(length); in GetOrCreateUnionType() local 503 JSHandle<TaggedArray> components(thread_, unionType->GetComponents()); in GetOrCreateUnionType() 507 unionType->SetComponents(thread_, components); in GetOrCreateUnionType() [all …]
|
D | ts_type_parser.cpp | 232 … JSHandle<TSUnionType> unionType = ParseUnionType(jsPandaFile, recordName, typeLiteralExtractor); in ParseNonImportType() local 233 return JSHandle<JSTaggedValue>(unionType); in ParseNonImportType() 349 JSHandle<TSUnionType> unionType = factory_->NewTSUnionType(numOfUnionMembers); in ParseUnionType() local 351 JSHandle<TaggedArray> components(thread_, unionType->GetComponents()); in ParseUnionType() 358 unionType->SetComponents(thread_, components); in ParseUnionType() 359 return unionType; in ParseUnionType()
|
D | ts_manager.h | 889 …TSTypeRef FindUnionInTypeTable(JSHandle<TSTypeTable> table, JSHandle<TSUnionType> unionType) const;
|
/arkcompiler/ets_runtime/ecmascript/compiler/type_inference/ |
D | pgo_type_infer.cpp | 147 JSHandle<TSUnionType> unionType(tsManager_->GetTSType(tsType.GetGTRef())); in CollectGateType() local 148 TaggedArray *components = TaggedArray::Cast(unionType->GetComponents().GetTaggedObject()); in CollectGateType()
|
D | method_type_infer.cpp | 399 auto unionType = tsManager_->GetOrCreateUnionType(typeList); in InferPhiGate() local 400 return UpdateType(gate, unionType, false); in InferPhiGate()
|
/arkcompiler/ets_frontend/es2panda/typescript/extractor/ |
D | typeExtractor.cpp | 572 UnionType unionType(this, typeAnnotation->AsTSUnionType()); in GetTypeIndexFromAnnotation() local 573 return unionType.GetTypeIndexShift(); in GetTypeIndexFromAnnotation() 579 UnionType unionType(this, type->AsTSUnionType()); in GetTypeIndexFromAnnotation() local 580 return unionType.GetTypeIndexShift(); in GetTypeIndexFromAnnotation()
|
/arkcompiler/ets_runtime/ecmascript/ts_types/tests/ |
D | ts_type_parser_test.cpp | 293 JSHandle<TSUnionType> unionType(type); in HWTEST_F_L0() local 294 EXPECT_EQ(resultGT, unionType->GetGT()); in HWTEST_F_L0()
|
/arkcompiler/ets_frontend/es2panda/ |
D | CMakeLists.txt | 288 typescript/types/unionType.cpp
|
D | BUILD.gn | 246 "typescript/types/unionType.cpp",
|
/arkcompiler/ets_runtime/ecmascript/tests/ |
D | dump_test.cpp | 1017 JSHandle<TSUnionType> unionType = factory->NewTSUnionType(1); in HWTEST_F_L0() local 1018 DUMP_FOR_HANDLE(unionType) in HWTEST_F_L0()
|
/arkcompiler/ets_frontend/es2panda/parser/ |
D | parserImpl.cpp | 1648 auto *unionType = AllocNode<ir::TSUnionType>(std::move(types)); in ParseTsUnionType() local 1649 …*typeVar = binder::Scope::CreateVar(Allocator(), "__type", binder::VariableFlags::TYPE, unionType); in ParseTsUnionType() 1650 unionType->SetVariable(typeVar); in ParseTsUnionType() 1651 unionType->SetRange({startLoc, endLoc}); in ParseTsUnionType() 1653 return unionType; in ParseTsUnionType()
|
/arkcompiler/ets_runtime/ecmascript/ |
D | object_factory.cpp | 3311 JSHandle<TSUnionType> unionType(thread_, header); in NewTSUnionType() local 3313 unionType->SetGT(GlobalTSTypeRef::Default()); in NewTSUnionType() 3314 unionType->SetComponents(thread_, JSTaggedValue::Undefined()); in NewTSUnionType() 3316 unionType->SetComponents(thread_, componentTypes); in NewTSUnionType() 3318 return unionType; in NewTSUnionType()
|