Home
last modified time | relevance | path

Searched refs:argumentType (Results 1 - 9 of 9) sorted by relevance

/arkcompiler/ets_frontend/ets2panda/ir/statements/
H A DreturnStatement.cpp81 checker::Type *argumentType = argument_->Check(checker); in SetReturnType() local
82 if (type->IsETSReferenceType() && !argumentType->IsETSReferenceType()) { in SetReturnType()
87 argumentType = checker->PrimitiveTypeAsETSBuiltinType(argumentType); in SetReturnType()
88 if (argumentType == nullptr) { in SetReturnType()
92 argument_->AddBoxingUnboxingFlags(checker->GetBoxingFlag(argumentType)); in SetReturnType()
/arkcompiler/ets_frontend/ets2panda/compiler/lowering/ets/
H A DtupleLowering.cpp42 auto *const argumentType = in CheckUpdateArgument() local
45 if ((argumentType == nullptr) || (!argumentType->IsETSTupleType())) { in CheckUpdateArgument()
48 return {argumentType}; in CheckUpdateArgument()
51 checker::Type *SetArgumentType(checker::Type *const argumentType) in SetArgumentType() argument
54 argument_->SetTsType(argumentType->AsETSTupleType()->ElementType()); in SetArgumentType()
58 void ComputeTypes(checker::Type *const argumentType) in ComputeTypes() argument
60 tupleTypeAtIdx_ = argumentType->AsETSTupleType()->GetTypeAtIndex( in ComputeTypes()
66 tupleElementTypeNode_ = checker_->AllocNode<ir::OpaqueTypeNode>(argumentType->AsETSTupleType()->ElementType()); in ComputeTypes()
185 auto const argumentType in ConvertTupleUpdate() local
[all...]
/arkcompiler/ets_frontend/ets2panda/checker/ets/
H A Dfunction.cpp151 Type *argumentType, Substitution *substitution) in EnhanceSubstitutionForReadonly()
153 return EnhanceSubstitutionForType(typeParams, paramType->GetUnderlying(), GetReadonlyType(argumentType), in EnhanceSubstitutionForReadonly()
158 bool ETSChecker::EnhanceSubstitutionForType(const ArenaVector<Type *> &typeParams, Type *paramType, Type *argumentType, in EnhanceSubstitutionForType() argument
161 if (argumentType->HasTypeFlag(TypeFlag::ETS_PRIMITIVE)) { in EnhanceSubstitutionForType()
162 argumentType = PrimitiveTypeAsETSBuiltinType(argumentType); in EnhanceSubstitutionForType()
169 if (!IsReferenceType(argumentType)) { in EnhanceSubstitutionForType()
170 LogTypeError({argumentType, " is not compatible with type ", tparam}, tparam->GetDeclNode()->Start()); in EnhanceSubstitutionForType()
174 ETSChecker::EmplaceSubstituted(substitution, originalTparam, argumentType); in EnhanceSubstitutionForType()
175 return IsCompatibleTypeArgument(tparam, argumentType, substitutio in EnhanceSubstitutionForType()
150 EnhanceSubstitutionForReadonly(const ArenaVector<Type *> &typeParams, ETSReadonlyType *paramType, Type *argumentType, Substitution *substitution) EnhanceSubstitutionForReadonly() 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
403 auto *argumentType = argument->Check(this); CheckInvokable() local
417 Type *argumentType = argument->Check(this); ValidateSignatureInvocationContext() local
440 auto *const argumentType = argument->Check(this); ValidateSignatureRestParams() local
464 auto *const argumentType = restArgument->Check(this); ValidateSignatureRestParams() local
[all...]
H A Dhelpers.cpp512 void ETSChecker::ResolveReturnStatement(checker::Type *funcReturnType, checker::Type *argumentType, in ResolveReturnStatement() argument
515 if (funcReturnType->IsETSReferenceType() || argumentType->IsETSReferenceType()) { in ResolveReturnStatement()
519 if (!argumentType->IsETSReferenceType()) { in ResolveReturnStatement()
520 argumentType = PrimitiveTypeAsETSBuiltinType(argumentType); in ResolveReturnStatement()
521 if (argumentType == nullptr) { in ResolveReturnStatement()
524 st->Argument()->AddBoxingUnboxingFlags(GetBoxingFlag(argumentType)); in ResolveReturnStatement()
534 if (argumentType != nullptr && funcReturnType != nullptr) { in ResolveReturnStatement()
535 funcReturnType = CreateETSUnionType({funcReturnType, argumentType}); in ResolveReturnStatement()
540 argumentType in ResolveReturnStatement()
[all...]
H A DtypeCheckingHelpers.cpp952 Type *const argumentType = arrowFuncExpr->Check(this);
955 checker::InvocationContext invocationCtx(Relation(), arrowFuncExpr, argumentType, parameterType,
1030 Type *const argumentType = arrowFuncExpr->Check(this);
1033 "Type '", argumentType, "' is not compatible with type '", targetType, "' at index ", index + 1};
/arkcompiler/ets_frontend/ets2panda/checker/
H A DETSAnalyzerHelpers.cpp562 bool CheckReturnType(ETSChecker *checker, checker::Type *funcReturnType, checker::Type *argumentType, in CheckReturnType() argument
566 if (argumentType != checker->GlobalVoidType()) { in CheckReturnType()
571 if (!checker::AssignmentContext(checker->Relation(), stArgument, argumentType, funcReturnType, in CheckReturnType()
585 checker::AssignmentContext(checker->Relation(), stArgument, argumentType, promiseArg, stArgument->Start(), {}, in CheckReturnType()
593 const Type *sourceType = checker->TryGettingFunctionTypeFromInvokeFunction(argumentType); in CheckReturnType()
594 if (!checker::AssignmentContext(checker->Relation(), stArgument, argumentType, funcReturnType, stArgument->Start(), in CheckReturnType()
622 auto *argumentType = arrowFunc->TsType(); in InferReturnType() local
625 const Type *sourceType = checker->TryGettingFunctionTypeFromInvokeFunction(argumentType); in InferReturnType()
628 if (!checker::AssignmentContext(checker->Relation(), arrowFunc, argumentType, funcReturnType, in InferReturnType()
671 checker::Type *argumentType in ProcessReturnStatements() local
[all...]
H A DETSAnalyzerHelpers.h60 bool CheckReturnType(ETSChecker *checker, checker::Type *funcReturnType, checker::Type *argumentType,
H A DETSchecker.h374 Type *argumentType, Substitution *substitution);
376 Type *argumentType, Substitution *substitution);
378 Type *argumentType, Substitution *substitution);
380 Type *argumentType, Substitution *substitution);
382 Type *argumentType, Substitution *substitution);
702 void ResolveReturnStatement(checker::Type *funcReturnType, checker::Type *argumentType,
H A DETSAnalyzer.cpp2286 checker::Type *argumentType = st->argument_->Check(checker); in CheckInferredFunctionReturnType() local
2287 return CheckReturnType(checker, funcReturnType, argumentType, st->argument_, containingFunc->IsAsyncFunc()); in CheckInferredFunctionReturnType()

Completed in 15 milliseconds