Home
last modified time | relevance | path

Searched refs:unionType (Results 1 – 16 of 16) sorted by relevance

/arkcompiler/ets_frontend/es2panda/typescript/types/
DunionType.cpp113 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()
DunionType.h122 static Type *HandleUnionType(UnionType *unionType, GlobalTypesHolder *globalTypesHolder);
/arkcompiler/ets_runtime/ecmascript/compiler/
Dobject_access_helper.cpp95 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/
DtypeChecker.ts237 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/
Dts_manager.cpp352 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 …]
Dts_type_parser.cpp232 … 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()
Dts_manager.h889 …TSTypeRef FindUnionInTypeTable(JSHandle<TSTypeTable> table, JSHandle<TSUnionType> unionType) const;
/arkcompiler/ets_runtime/ecmascript/compiler/type_inference/
Dpgo_type_infer.cpp147 JSHandle<TSUnionType> unionType(tsManager_->GetTSType(tsType.GetGTRef())); in CollectGateType() local
148 TaggedArray *components = TaggedArray::Cast(unionType->GetComponents().GetTaggedObject()); in CollectGateType()
Dmethod_type_infer.cpp399 auto unionType = tsManager_->GetOrCreateUnionType(typeList); in InferPhiGate() local
400 return UpdateType(gate, unionType, false); in InferPhiGate()
/arkcompiler/ets_frontend/es2panda/typescript/extractor/
DtypeExtractor.cpp572 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/
Dts_type_parser_test.cpp293 JSHandle<TSUnionType> unionType(type); in HWTEST_F_L0() local
294 EXPECT_EQ(resultGT, unionType->GetGT()); in HWTEST_F_L0()
/arkcompiler/ets_frontend/es2panda/
DCMakeLists.txt288 typescript/types/unionType.cpp
DBUILD.gn246 "typescript/types/unionType.cpp",
/arkcompiler/ets_runtime/ecmascript/tests/
Ddump_test.cpp1017 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/
DparserImpl.cpp1648 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/
Dobject_factory.cpp3311 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()