Home
last modified time | relevance | path

Searched refs:typeParams (Results 1 - 25 of 58) sorted by relevance

123

/arkcompiler/ets_frontend/ets2panda/checker/ets/
H A DtypeRelationContext.cpp113 static void CheckInstantiationConstraints(ETSChecker *checker, ArenaVector<Type *> const &typeParams, in CheckInstantiationConstraints() argument
118 for (auto type : typeParams) { in CheckInstantiationConstraints()
143 for (auto const &[typeParams, substitution, pos] : records) { in TryCheckConstraints()
144 CheckInstantiationConstraints(checker_, *typeParams, substitution, pos); in TryCheckConstraints()
154 auto const &typeParams = type->TypeArguments(); in InstantiateType() local
156 while (typeArgTypes.size() < typeParams.size()) { in InstantiateType()
157 typeArgTypes.push_back(typeParams.at(typeArgTypes.size())); in InstantiateType()
161 for (size_t idx = 0; idx < typeParams.size(); idx++) { in InstantiateType()
162 if (!typeParams[idx]->IsETSTypeParameter()) { in InstantiateType()
165 ETSChecker::EmplaceSubstituted(substitution, typeParams[id in InstantiateType()
[all...]
H A Dfunction_helpers.h75 auto &sigParams = signature->GetSignatureInfo()->typeParams; in InferUntilFail()
106 if (checker->EnhanceSubstitutionForType(sigInfo->typeParams, paramType, argType, substitution)) { in InferUntilFail()
122 auto &sigParams = signature->GetSignatureInfo()->typeParams; in BuildImplicitSubstitutionForArguments()
136 if (!checker->EnhanceSubstitutionForType(sigInfo->typeParams, newTypeParam, dflt, substitution)) { in BuildImplicitSubstitutionForArguments()
143 !checker->EnhanceSubstitutionForType(sigInfo->typeParams, in BuildImplicitSubstitutionForArguments()
158 auto &sigParams = signature->GetSignatureInfo()->typeParams; in BuildExplicitSubstitutionForArguments()
202 if (typeArguments == nullptr && signature->GetSignatureInfo()->typeParams.empty()) { in MaybeSubstituteTypeParameters()
H A DutilityTypeHandlers.cpp25 ir::TypeNode *ETSChecker::GetUtilityTypeTypeParamNode(const ir::TSTypeParameterInstantiation *const typeParams, in GetUtilityTypeTypeParamNode() argument
28 if (typeParams->Params().size() != 1) { in GetUtilityTypeTypeParamNode()
29 LogTypeError({"Invalid number of type parameters for ", utilityTypeName, " type"}, typeParams->Start()); in GetUtilityTypeTypeParamNode()
32 return typeParams->Params().front(); in GetUtilityTypeTypeParamNode()
35 Type *ETSChecker::HandleUtilityTypeParameterNode(const ir::TSTypeParameterInstantiation *const typeParams, in HandleUtilityTypeParameterNode() argument
38 if (typeParams == nullptr) { in HandleUtilityTypeParameterNode()
42 auto *const bareType = GetUtilityTypeTypeParamNode(typeParams, utilityType)->Check(this); in HandleUtilityTypeParameterNode()
56 LogTypeError("This utility type is not yet implemented.", typeParams->Start()); in HandleUtilityTypeParameterNode()
217 ArenaVector<ir::TSTypeParameter *> typeParams(Allocator()->Adapter()); in CreatePartialClassDeclaration()
223 typeParams in CreatePartialClassDeclaration()
446 HandleReadonlyType(const ir::TSTypeParameterInstantiation *const typeParams) HandleReadonlyType() argument
[all...]
H A Dfunction.cpp93 bool ETSChecker::InsertTypeIntoSubstitution(const ArenaVector<Type *> &typeParams, const Type *typeParam, in InsertTypeIntoSubstitution() argument
97 if (typeParams.size() > index && in InsertTypeIntoSubstitution()
98 IsCompatibleTypeArgument(typeParams[index]->AsETSTypeParameter(), objectParam, substitution) && in InsertTypeIntoSubstitution()
99 std::find(typeParams.begin(), typeParams.end(), typeParam) != typeParams.end()) { in InsertTypeIntoSubstitution()
100 substitution->emplace(typeParams[index]->AsETSTypeParameter(), objectParam); in InsertTypeIntoSubstitution()
107 bool ETSChecker::EnhanceSubstitutionForGenericType(const ArenaVector<Type *> &typeParams, const Type *argType, in EnhanceSubstitutionForGenericType() argument
118 for (const auto it : typeParams) { in EnhanceSubstitutionForGenericType()
140 res = InsertTypeIntoSubstitution(typeParams, paramTypeArg in EnhanceSubstitutionForGenericType()
150 EnhanceSubstitutionForReadonly(const ArenaVector<Type *> &typeParams, ETSReadonlyType *paramType, Type *argumentType, Substitution *substitution) EnhanceSubstitutionForReadonly() argument
158 EnhanceSubstitutionForType(const ArenaVector<Type *> &typeParams, Type *paramType, Type *argumentType, Substitution *substitution) EnhanceSubstitutionForType() argument
199 EnhanceSubstitutionForUnion(const ArenaVector<Type *> &typeParams, ETSUnionType *paramUn, Type *argumentType, Substitution *substitution) EnhanceSubstitutionForUnion() argument
239 EnhanceSubstitutionForObject(const ArenaVector<Type *> &typeParams, ETSObjectType *paramType, Type *argumentType, Substitution *substitution) EnhanceSubstitutionForObject() argument
289 EnhanceSubstitutionForArray(const ArenaVector<Type *> &typeParams, ETSArrayType *const paramType, Type *const argumentType, Substitution *const substitution) EnhanceSubstitutionForArray() argument
[all...]
/arkcompiler/ets_frontend/es2panda/ir/expressions/
H A DcallExpression.h38 TSTypeParameterInstantiation *typeParams, bool optional) in CallExpression()
42 typeParams_(typeParams), in CallExpression()
72 void SetTypeParams(TSTypeParameterInstantiation *typeParams) in SetTypeParams() argument
74 typeParams_ = typeParams; in SetTypeParams()
37 CallExpression(Expression *callee, ArenaVector<Expression *> &&arguments, TSTypeParameterInstantiation *typeParams, bool optional) CallExpression() argument
H A DtaggedTemplateExpression.h38 TSTypeParameterInstantiation *typeParams) in TaggedTemplateExpression()
39 : Expression(AstNodeType::TAGGED_TEMPLATE_EXPRESSION), tag_(tag), quasi_(quasi), typeParams_(typeParams) in TaggedTemplateExpression()
37 TaggedTemplateExpression(Expression *tag, TemplateLiteral *quasi, TSTypeParameterInstantiation *typeParams) TaggedTemplateExpression() argument
H A DnewExpression.h36 explicit NewExpression(Expression *callee, TSTypeParameterInstantiation *typeParams, in NewExpression() argument
39 typeParams_(typeParams), arguments_(std::move(arguments)) in NewExpression()
/arkcompiler/ets_frontend/ets2panda/checker/types/
H A Dsignature.h31 explicit SignatureInfo(ArenaAllocator *allocator) : typeParams {allocator->Adapter()}, params {allocator->Adapter()} in SignatureInfo()
36 : typeParams(allocator->Adapter()), params(allocator->Adapter()) in SignatureInfo()
38 for (auto *it : other->typeParams) { in SignatureInfo()
39 typeParams.push_back(it); in SignatureInfo()
59 ArenaVector<Type *> typeParams; member in ark::es2panda::ark::es2panda::checker::SignatureInfo
136 return signatureInfo_->typeParams; in TypeParams()
141 return signatureInfo_->typeParams; in TypeParams()
/arkcompiler/ets_frontend/ets2panda/ir/expressions/
H A DtaggedTemplateExpression.cpp97 auto *const typeParams = typeParams_ != nullptr ? typeParams_->Clone(allocator, nullptr) : nullptr; in Clone() local
99 if (auto *const clone = allocator->New<TaggedTemplateExpression>(tag, quasi, typeParams); clone != nullptr) { in Clone()
106 if (typeParams != nullptr) { in Clone()
107 typeParams->SetParent(clone); in Clone()
H A DdirectEvalExpression.h29 TSTypeParameterInstantiation *typeParams, bool optional, uint32_t parserStatus) in DirectEvalExpression()
30 : CallExpression(callee, std::move(arguments), typeParams, optional), parserStatus_(parserStatus) in DirectEvalExpression()
28 DirectEvalExpression(Expression *callee, ArenaVector<Expression *> &&arguments, TSTypeParameterInstantiation *typeParams, bool optional, uint32_t parserStatus) DirectEvalExpression() argument
H A DtaggedTemplateExpression.h33 explicit TaggedTemplateExpression(Expression *tag, TemplateLiteral *quasi, TSTypeParameterInstantiation *typeParams) in TaggedTemplateExpression() argument
34 : Expression(AstNodeType::TAGGED_TEMPLATE_EXPRESSION), tag_(tag), quasi_(quasi), typeParams_(typeParams) in TaggedTemplateExpression()
/arkcompiler/ets_frontend/ets2panda/ir/ts/
H A DtsTypeAliasDeclaration.h32 explicit TSTypeAliasDeclaration(ArenaAllocator *allocator, Identifier *id, TSTypeParameterDeclaration *typeParams, in TSTypeAliasDeclaration() argument
37 typeParams_(typeParams), in TSTypeAliasDeclaration()
83 void SetTypeParameters(ir::TSTypeParameterDeclaration *typeParams) in SetTypeParameters() argument
85 typeParams_ = typeParams; in SetTypeParameters()
H A DtsTypeReference.h30 explicit TSTypeReference(Expression *typeName, TSTypeParameterInstantiation *typeParams) in TSTypeReference() argument
31 : TypeNode(AstNodeType::TS_TYPE_REFERENCE), typeName_(typeName), typeParams_(typeParams) in TSTypeReference()
H A DtsImportType.h26 explicit TSImportType(Expression *param, TSTypeParameterInstantiation *typeParams, Expression *qualifier, in TSImportType() argument
30 typeParams_(typeParams), in TSImportType()
/arkcompiler/ets_frontend/ets2panda/util/ast-builders/
H A DetsTypeReferencePartBuilder.h35 ETSTypeReferencePartBuilder &SetTypeParams(TSTypeParameterInstantiation *typeParams) in SetTypeParams() argument
37 typeParams_ = typeParams; in SetTypeParams()
H A DtaggedTemplateExpressionBuilder.h35 TaggedTemplateExpressionBuilder &SetTypeParams(TSTypeParameterInstantiation *typeParams) in SetTypeParams() argument
37 typeParams_ = typeParams; in SetTypeParams()
H A DtsImportTypeBuilder.h35 TSImportTypeBuilder &SetTypeParams(TSTypeParameterInstantiation *typeParams) in SetTypeParams() argument
37 typeParams_ = typeParams; in SetTypeParams()
H A DtsTypeAliasDeclarationBuilder.h35 TSTypeAliasDeclarationBuilder &SetTypeParams(TSTypeParameterDeclaration *typeParams) in SetTypeParams() argument
37 typeParams_ = typeParams; in SetTypeParams()
H A DtsTypeReferenceBuilder.h35 TSTypeReferenceBuilder &SetTypeParams(TSTypeParameterInstantiation *typeParams) in SetTypeParams() argument
37 typeParams_ = typeParams; in SetTypeParams()
/arkcompiler/ets_frontend/ets2panda/ir/as/
H A DnamedType.h54 void SetTypeParams(TSTypeParameterInstantiation *typeParams) in SetTypeParams() argument
56 typeParams_ = typeParams; in SetTypeParams()
/arkcompiler/ets_frontend/ets2panda/ir/base/
H A DscriptFunctionSignature.h30 FunctionSignature(TSTypeParameterDeclaration *typeParams, FunctionParams &&params, TypeNode *returnTypeAnnotation) in FunctionSignature() argument
31 : typeParams_(typeParams), params_(std::move(params)), returnTypeAnnotation_(returnTypeAnnotation) in FunctionSignature()
/arkcompiler/ets_frontend/es2panda/ir/ts/
H A DtsImportType.h36 explicit TSImportType(Expression *param, TSTypeParameterInstantiation *typeParams, Expression *qualifier, in TSImportType() argument
40 typeParams_(typeParams), in TSImportType()
H A DtsTypeAliasDeclaration.h41 explicit TSTypeAliasDeclaration(Identifier *id, TSTypeParameterDeclaration *typeParams, Expression *typeAnnotation, in TSTypeAliasDeclaration() argument
45 typeParams_(typeParams), in TSTypeAliasDeclaration()
H A DtsTypeReference.h41 explicit TSTypeReference(Expression *typeName, TSTypeParameterInstantiation *typeParams) in TSTypeReference() argument
42 : TypeNode(AstNodeType::TS_TYPE_REFERENCE), typeName_(typeName), typeParams_(typeParams) in TSTypeReference()
/arkcompiler/ets_frontend/ets2panda/ir/ets/
H A DetsTypeReferencePart.h25 explicit ETSTypeReferencePart(ir::Expression *name, ir::TSTypeParameterInstantiation *typeParams, in ETSTypeReferencePart() argument
27 : TypeNode(AstNodeType::ETS_TYPE_REFERENCE_PART), name_(name), typeParams_(typeParams), prev_(prev) in ETSTypeReferencePart()

Completed in 11 milliseconds

123