Home
last modified time | relevance | path

Searched refs:targetType (Results 1 - 25 of 40) sorted by relevance

12

/arkcompiler/ets_frontend/es2panda/typescript/core/
H A DtypeElaborationContext.h34 ElaborationContext(Checker *checker, Type *targetType, Type *sourceType, const ir::Expression *sourceNode, in ElaborationContext() argument
37 targetType_(targetType), in ElaborationContext()
61 ArrayElaborationContext(Checker *checker, Type *targetType, Type *sourceType, const ir::Expression *sourceNode, in ArrayElaborationContext() argument
63 : ElaborationContext(checker, targetType, sourceType, sourceNode, startPos) in ArrayElaborationContext()
76 ObjectElaborationContext(Checker *checker, Type *targetType, Type *sourceType, const ir::Expression *sourceNode, in ObjectElaborationContext() argument
78 : ElaborationContext(checker, targetType, sourceType, sourceNode, startPos) in ObjectElaborationContext()
H A Dhelpers.cpp315 void Checker::ElaborateElementwise(Type *targetType, const ir::Expression *sourceNode, const lexer::SourcePosition &pos) in ElaborateElementwise() argument
321 if (IsTypeAssignableTo(sourceType, targetType)) { in ElaborateElementwise()
325 if (targetType->IsArrayType() && sourceNode->IsArrayExpression()) { in ElaborateElementwise()
326 ArrayElaborationContext(this, targetType, sourceType, sourceNode, pos).Start(); in ElaborateElementwise()
327 } else if (targetType->IsObjectType() || targetType->IsUnionType()) { in ElaborateElementwise()
329 ObjectElaborationContext(this, targetType, sourceType, sourceNode, pos).Start(); in ElaborateElementwise()
331 ArrayElaborationContext(this, targetType, sourceType, sourceNode, pos).Start(); in ElaborateElementwise()
335 ThrowAssignmentError(sourceType, targetType, pos); in ElaborateElementwise()
/arkcompiler/ets_frontend/ets2panda/checker/ts/
H A DtypeElaborationContext.h34 ElaborationContext(TSChecker *checker, Type *targetType, Type *sourceType, ir::Expression *sourceNode, in ElaborationContext() argument
37 targetType_(targetType), in ElaborationContext()
63 ArrayElaborationContext(TSChecker *checker, Type *targetType, Type *sourceType, ir::Expression *sourceNode, in ArrayElaborationContext() argument
65 : ElaborationContext(checker, targetType, sourceType, sourceNode, startPos) in ArrayElaborationContext()
78 ObjectElaborationContext(TSChecker *checker, Type *targetType, Type *sourceType, ir::Expression *sourceNode, in ObjectElaborationContext() argument
80 : ElaborationContext(checker, targetType, sourceType, sourceNode, startPos) in ObjectElaborationContext()
H A Dhelpers.cpp313 void TSChecker::ElaborateElementwise(Type *targetType, ir::Expression *sourceNode, const lexer::SourcePosition &pos) in ElaborateElementwise() argument
319 if (IsTypeAssignableTo(sourceType, targetType)) { in ElaborateElementwise()
323 if (targetType->IsArrayType() && sourceNode->IsArrayExpression()) { in ElaborateElementwise()
324 ArrayElaborationContext(this, targetType, sourceType, sourceNode, pos).Start(); in ElaborateElementwise()
325 } else if (targetType->IsObjectType() || targetType->IsUnionType()) { in ElaborateElementwise()
327 ObjectElaborationContext(this, targetType, sourceType, sourceNode, pos).Start(); in ElaborateElementwise()
329 ArrayElaborationContext(this, targetType, sourceType, sourceNode, pos).Start(); in ElaborateElementwise()
333 ThrowAssignmentError(sourceType, targetType, pos); in ElaborateElementwise()
H A Dobject.cpp541 Type *targetType = GetTypeOfVariable(prop); in ValidateInterfaceMemberRedeclaration() local
543 IsTypeIdenticalTo(targetType, sourceType, in ValidateInterfaceMemberRedeclaration()
545 " must be of type ", sourceType, ", but here has type ", targetType, "."}, in ValidateInterfaceMemberRedeclaration()
/arkcompiler/ets_frontend/ets2panda/compiler/core/
H A DtargetTypeContext.cpp21 TargetTypeContext::TargetTypeContext(ETSGen *etsg, const checker::Type *targetType) in TargetTypeContext() argument
24 etsg->targetType_ = targetType; in TargetTypeContext()
H A DETSGen.cpp127 const checker::Type *const targetType) in ApplyConversionAndStoreAccumulator()
129 ApplyConversion(node, targetType); in ApplyConversionAndStoreAccumulator()
1070 void ETSGen::ApplyConversionCast(const ir::AstNode *node, const checker::Type *targetType) in ApplyConversionCast() argument
1072 switch (checker::ETSChecker::TypeKind(targetType)) { in ApplyConversionCast()
1093 CastDynamicToObject(node, targetType); in ApplyConversionCast()
1098 CastToDynamic(node, targetType->AsETSDynamicType()); in ApplyConversionCast()
1121 void ETSGen::ApplyConversion(const ir::AstNode *node, const checker::Type *targetType) in ApplyConversion() argument
1123 auto ttctx = TargetTypeContext(this, targetType); in ApplyConversion()
1140 if (targetType == nullptr) { in ApplyConversion()
1144 ApplyConversionCast(node, targetType); in ApplyConversion()
126 ApplyConversionAndStoreAccumulator(const ir::AstNode *const node, const VReg vreg, const checker::Type *const targetType) ApplyConversionAndStoreAccumulator() argument
1147 ApplyCast(const ir::AstNode *node, const checker::Type *targetType) ApplyCast() argument
1178 ApplyCastToBoxingFlags(const ir::AstNode *node, const ir::BoxingUnboxingFlags targetType) ApplyCastToBoxingFlags() argument
1203 EmitUnboxedCall(const ir::AstNode *node, std::string_view signatureFlag, const checker::Type *const targetType, const checker::Type *const boxedType) EmitUnboxedCall() argument
1737 CastToReftype(const ir::AstNode *const node, const checker::Type *const targetType, const bool unchecked) CastToReftype() argument
1766 CastDynamicToObject(const ir::AstNode *node, const checker::Type *targetType) CastDynamicToObject() argument
2140 AssumeNonNullish(const ir::AstNode *node, checker::Type const *targetType) AssumeNonNullish() argument
[all...]
H A DtargetTypeContext.h30 explicit TargetTypeContext(ETSGen *etsg, const checker::Type *targetType);
H A DETSGen.h47 void ApplyConversionAndStoreAccumulator(const ir::AstNode *node, VReg vreg, const checker::Type *targetType);
291 void AssumeNonNullish(const ir::AstNode *node, checker::Type const *targetType);
392 void ApplyConversionCast(const ir::AstNode *node, const checker::Type *targetType);
393 void ApplyConversion(const ir::AstNode *node, const checker::Type *targetType);
394 void ApplyCast(const ir::AstNode *node, const checker::Type *targetType);
395 void ApplyCastToBoxingFlags(const ir::AstNode *node, const ir::BoxingUnboxingFlags targetType);
509 void CastToReftype(const ir::AstNode *node, const checker::Type *targetType, bool unchecked);
510 void CastDynamicToObject(const ir::AstNode *node, const checker::Type *targetType);
674 void EmitUnboxedCall(const ir::AstNode *node, std::string_view signatureFlag, const checker::Type *targetType,
1160 void LoadAccumulatorNumber(const ir::AstNode *node, T number, checker::TypeFlag targetType);
1229 LoadAccumulatorNumber(const ir::AstNode *node, T number, checker::TypeFlag targetType) LoadAccumulatorNumber() argument
[all...]
H A DETSCompiler.cpp1738 auto *targetType = etsg->Checker()->GetApparentType(expr->TsType()); in CompileCastUnboxable() local
1739 ASSERT(targetType->IsETSObjectType()); in CompileCastUnboxable()
1741 switch (targetType->AsETSObjectType()->BuiltInKind()) { in CompileCastUnboxable()
1783 auto *targetType = etsg->Checker()->GetApparentType(expr->TsType()); in CompileCastPrimitives() local
1785 switch (checker::ETSChecker::TypeKind(targetType)) { in CompileCastPrimitives()
1827 auto *targetType = etsg->Checker()->GetApparentType(expr->TsType()); in CompileCast() local
1829 switch (checker::ETSChecker::TypeKind(targetType)) { in CompileCast()
1837 etsg->CastToReftype(expr, targetType, expr->isUncheckedCast_); in CompileCast()
1841 etsg->CastToDynamic(expr, targetType->AsETSDynamicType()); in CompileCast()
1874 auto *targetType in Compile() local
[all...]
/arkcompiler/ets_frontend/es2panda/ir/ts/
H A DtsAsExpression.cpp102 checker::Type *targetType = typeAnnotation_->AsTypeNode()->GetType(checker); in Check() local
105 targetType, exprType, in Check()
106 {"Conversion of type '", exprType, "' to type '", targetType, in Check()
111 return targetType; in Check()
H A DtsInterfaceDeclaration.cpp86 checker::Type *targetType = checker->GetTypeOfVariable(res->second.first); in CheckInheritedPropertiesAreIdentical() local
87 checker->IsTypeIdenticalTo(sourceType, targetType, in CheckInheritedPropertiesAreIdentical()
/arkcompiler/ets_frontend/ets2panda/checker/types/ts/
H A DobjectType.cpp129 Type *targetType = relation->GetChecker()->GetTypeOfVariable(it); in AssignProperties() local
134 if (!relation->IsAssignableTo(sourceType, targetType)) { in AssignProperties()
148 !relation->IsAssignableTo(numberInfo->GetType(), targetType)) { in AssignProperties()
152 if (stringInfo != nullptr && !relation->IsAssignableTo(stringInfo->GetType(), targetType)) { in AssignProperties()
H A DinterfaceType.cpp53 Type *targetType = relation->GetChecker()->GetTypeOfVariable(targetProp); in CheckVarType()
55 return relation->IsIdenticalTo(targetType, sourceType); in CheckVarType()
/arkcompiler/ets_frontend/es2panda/typescript/types/
H A DobjectType.cpp133 Type *targetType = relation->GetChecker()->GetTypeOfVariable(it); in AssignProperties() local
138 if (!relation->IsAssignableTo(sourceType, targetType)) { in AssignProperties()
151 !relation->IsAssignableTo(numberInfo->GetType(), targetType)) { in AssignProperties()
155 if (stringInfo && !relation->IsAssignableTo(stringInfo->GetType(), targetType)) { in AssignProperties()
H A DinterfaceType.cpp60 Type *targetType = relation->GetChecker()->GetTypeOfVariable(targetProp); in IsPropertiesIdentical()
62 return relation->IsIdenticalTo(targetType, sourceType); in IsPropertiesIdentical()
/arkcompiler/ets_frontend/ets2panda/checker/types/ets/
H A DetsFunctionType.cpp241 auto *targetType = target->AsETSObjectType(); in Cast() local
242 if (targetType->HasObjectFlag(ETSObjectFlags::FUNCTIONAL)) { in Cast()
243 auto *targetInvokeVar = targetType->GetProperty(FUNCTIONAL_INTERFACE_INVOKE_METHOD_NAME, in Cast()
H A DetsUnionType.cpp639 auto isCastablePred = [](TypeRelation *r, Type *sourceType, Type *targetType) {
640 if (targetType->IsETSUnionType()) {
641 auto *foundTargetType = targetType->AsETSUnionType()->FindTypeIsCastableToThis(r->GetNode(), r, sourceType);
644 r->IsCastableTo(sourceType, targetType);
/arkcompiler/ets_frontend/ets2panda/checker/ets/
H A Dobject.cpp1650 auto const *targetType = assignmentExpr->Left()->TsTypeOrError();
1651 if (targetType->IsETSObjectType() &&
1652 targetType->AsETSObjectType()->HasObjectFlag(ETSObjectFlags::FUNCTIONAL)) {
1814 auto *targetType = GetTypeOfVariable(target_ident->Variable());
1815 ASSERT(targetType != nullptr);
1817 if (!targetType->IsETSObjectType() ||
1818 !targetType->AsETSObjectType()->HasObjectFlag(ETSObjectFlags::FUNCTIONAL)) {
1986 const char *targetType {};
1989 targetType = "field";
1991 targetType
[all...]
H A Dhelpers.cpp550 const Type *targetType = TryGettingFunctionTypeFromInvokeFunction(funcReturnType); in ResolveReturnStatement() local
553 LogTypeError({"Function cannot have different primitive return types, require '", targetType, "', found '", in ResolveReturnStatement()
825 checker::Type *ETSChecker::ResolveSmartType(checker::Type *sourceType, checker::Type *targetType) in ResolveSmartType() argument
828 if (targetType->HasTypeFlag(TypeFlag::ETS_PRIMITIVE_RETURN)) { in ResolveSmartType()
829 return targetType; in ResolveSmartType()
833 if (targetType->IsETSTupleType()) { in ResolveSmartType()
834 return targetType; in ResolveSmartType()
838 if (targetType->IsETSObjectType() && targetType->AsETSObjectType()->HasObjectFlag(ETSObjectFlags::BUILTIN_TYPE)) { in ResolveSmartType()
839 return targetType; in ResolveSmartType()
[all...]
H A DtypeCheckingHelpers.cpp537 const auto *const targetType = GetTypeOfVariable(id->Variable());
538 ASSERT(targetType != nullptr);
540 if (!targetType->IsETSObjectType() && !targetType->IsETSUnionType()) {
1031 const Type *targetType = TryGettingFunctionTypeFromInvokeFunction(parameterType);
1033 "Type '", argumentType, "' is not compatible with type '", targetType, "' at index ", index + 1};
/arkcompiler/ets_frontend/ets2panda/checker/
H A DETSAnalyzer.cpp869 const checker::Type *targetType = checker->TryGettingFunctionTypeFromInvokeFunction(leftType); in Check() local
873 {"Type '", sourceType, "' cannot be assigned to type '", targetType, "'"}); in Check()
1556 const checker::Type *targetType = checker->TryGettingFunctionTypeFromInvokeFunction(propType); in CheckObjectExprProps() local
1560 {"Type '", sourceType, "' is not compatible with type '", targetType, "' at property '", pname, "'"}); in CheckObjectExprProps()
2540 auto *const targetType = expr->TypeAnnotation()->AsTypeNode()->GetType(checker); in Check() local
2544 expr->Expr()->AsObjectExpression()->SetPreferredType(targetType); in Check()
2548 expr->Expr()->AsArrayExpression()->SetPreferredType(targetType); in Check()
2557 if (targetType->HasTypeFlag(checker::TypeFlag::ETS_PRIMITIVE) && sourceType->IsETSReferenceType()) { in Check()
2558 auto *const boxedTargetType = checker->PrimitiveTypeAsETSBuiltinType(targetType); in Check()
2564 if (sourceType->DefinitelyETSNullish() && !targetType in Check()
[all...]
/arkcompiler/ets_frontend/ets2panda/compiler/lowering/ets/
H A DinterfaceObjectLiteralLowering.cpp235 const auto *const targetType = objExpr->TsType(); in HandleInterfaceLowering() local
236 ASSERT(targetType->AsETSObjectType()->GetDeclNode()->IsTSInterfaceDeclaration()); in HandleInterfaceLowering()
237 auto *ifaceNode = targetType->AsETSObjectType()->GetDeclNode()->AsTSInterfaceDeclaration(); in HandleInterfaceLowering()
H A DobjectLiteralLowering.cpp29 static void MaybeAllowConstAssign(checker::Type *targetType, ArenaVector<ir::Statement *> &statements) in MaybeAllowConstAssign() argument
31 if (!targetType->IsETSObjectType()) { in MaybeAllowConstAssign()
/arkcompiler/runtime_core/static_core/libllvmbackend/lowering/
H A Dllvm_ir_constructor.cpp1562 auto targetType = inst->GetType(); in CreateShiftOp() local
1563 bool target64 = (targetType == DataType::UINT64) || (targetType == DataType::INT64); in CreateShiftOp()
1773 auto targetType = inst->GetType(); in CreateCastToInt() local
1779 auto llvmId = DataType::IsTypeSigned(targetType) ? llvm::Intrinsic::fptosi_sat : llvm::Intrinsic::fptoui_sat; in CreateCastToInt()
1781 intrinsicTypes.assign({GetExactType(targetType), sourceType}); in CreateCastToInt()
1825 auto targetType = is64 ? builder_.getInt64Ty() : builder_.getInt32Ty(); in CreateRoundArm64() local
1836 auto decl = llvm::Intrinsic::getDeclaration(module, llvm::Intrinsic::lround, {targetType, sourceType}); in CreateRoundArm64()
1858 auto roundPhi = builder_.CreatePHI(targetType, 2U); in CreateRoundArm64()
2609 llvm::Type *LLVMIrConstructor::GetExactType(DataType::Type targetType) in GetExactType() argument
2703 CoerceValue(llvm::Value *value, DataType::Type sourceType, DataType::Type targetType) CoerceValue() argument
2770 CoerceValue(llvm::Value *value, llvm::Type *targetType) CoerceValue() argument
3628 auto targetType = inst->GetType(); VisitCast() local
[all...]

Completed in 36 milliseconds

12