/arkcompiler/ets_frontend/es2panda/typescript/types/ |
H A D | signature.cpp | 26 it->SetTsType(it->TsType()->Instantiate(allocator, relation, globalTypes)); in Copy() 47 (*it)->TsType()->ToString(ss); in ToString() 62 signatureInfo_->restVar->TsType()->ToString(ss); in ToString() 89 relation->IsIdenticalTo(signatureInfo_->params[i]->TsType(), other->Params()[i]->TsType()); in Identical() 96 relation->IsIdenticalTo(signatureInfo_->restVar->TsType(), other->RestVar()->TsType()); in Identical() 117 relation->IsAssignableTo(source->Params()[i]->TsType(), signatureInfo_->restVar->TsType()); in AssignmentTarget() 126 relation->IsAssignableTo(source->Params()[i]->TsType(), Param in AssignmentTarget() [all...] |
H A D | tupleType.cpp | 27 unionTypes.push_back(it->TsType()); in ConvertToArrayType() 43 (*it)->TsType()->ToString(ss); in ToString() 62 (*it)->TsType()->ToString(ss); in ToString() 86 relation->IsIdenticalTo(targetProp->TsType(), sourceProp->TsType()); in Identical() 123 Type *targetPropType = targetProp->TsType(); in AssignmentTarget() 124 Type *sourcePropType = sourceProperties[i]->TsType(); in AssignmentTarget()
|
/arkcompiler/ets_frontend/ets2panda/ast_verifier/ |
H A D | helpers.cpp | 53 if (typedAst->TsType() == nullptr) { in IsBooleanType() 57 if (typedAst->TsType()->HasTypeFlag(checker::TypeFlag::ETS_OBJECT) && in IsBooleanType() 59 return typedAst->TsType()->AsETSObjectType()->HasObjectFlag(checker::ETSObjectFlags::BUILTIN_BOOLEAN); in IsBooleanType() 62 return typedAst->TsType()->HasTypeFlag(checker::TypeFlag::ETS_BOOLEAN) || in IsBooleanType() 63 typedAst->TsType()->HasTypeFlag(checker::TypeFlag::BOOLEAN_LIKE); in IsBooleanType() 80 if (typedAst->TsType() == nullptr) { in IsValidTypeForBinaryOp() 90 if (typedAst->TsType()->HasTypeFlag(checker::TypeFlag::ETS_OBJECT) && in IsValidTypeForBinaryOp() 91 typedAst->TsType()->AsETSObjectType()->HasObjectFlag(checker::ETSObjectFlags::BUILTIN_BIGINT)) { in IsValidTypeForBinaryOp() 95 if (typedAst->TsType()->HasTypeFlag(checker::TypeFlag::ETS_OBJECT) && in IsValidTypeForBinaryOp() 97 return typedAst->TsType() in IsValidTypeForBinaryOp() [all...] |
H A D | sequenceExpressionHasLastType.cpp | 28 if (expr->TsType() == nullptr) { in operator ()() 32 if (last->TsType() == nullptr) { in operator ()() 36 if (expr->TsType() != last->TsType()) { in operator ()()
|
/arkcompiler/ets_frontend/ets2panda/compiler/core/ |
H A D | ETSCompiler.cpp | 39 etsg->SetAccumulatorType(st->TsType()); in Compile() 48 if (st->Value() == nullptr && st->TsType()->HasTypeFlag(checker::TypeFlag::ETS_PRIMITIVE)) { in Compile() 52 auto ttctx = compiler::TargetTypeContext(etsg, st->TsType()); in Compile() 56 etsg->LoadDefaultValue(st, st->TsType()); in Compile() 59 etsg->ApplyConversion(st->Value(), st->TsType()); in Compile() 63 etsg->StoreStaticOwnProperty(st, st->TsType(), st->Key()->AsIdentifier()->Name()); in Compile() 65 etsg->StoreProperty(st, st->TsType(), etsg->GetThisReg(), st->Key()->AsIdentifier()->Name()); in Compile() 73 etsg->SetAccumulatorType(expr->TsType()); in Compile() 74 ASSERT(etsg->Checker()->Relation()->IsIdenticalTo(etsg->GetAccumulatorType(), expr->TsType())); in Compile() 82 auto *literalType = literal->TsType(); in Compile() [all...] |
/arkcompiler/ets_frontend/ets2panda/checker/types/ |
H A D | signature.cpp | 48 auto *newParamType = param->TsType()->Substitute(relation, substitution); in Substitute() 49 if (newParamType != param->TsType()) { in Substitute() 58 auto *newRestType = signatureInfo_->restVar->TsType()->Substitute(relation, substitution); in Substitute() 59 if (newRestType != signatureInfo_->restVar->TsType()) { in Substitute() 90 param->TsType()->ToAssemblerTypeWithRank(ss); in ToAssemblerType() 95 signatureInfo_->restVar->TsType()->ToAssemblerTypeWithRank(ss); in ToAssemblerType() 108 auto *const paramType = signatureInfo_->params[idx]->TsType(); in Copy() 112 copiedInfo->params[idx]->TsType()->AsETSObjectType()->SetTypeArguments(std::move(originalTypeArgs)); in Copy() 153 (*it)->TsType()->ToString(ss, precise); in ToString() 168 signatureInfo_->restVar->TsType() in ToString() [all...] |
/arkcompiler/ets_frontend/ets2panda/compiler/lowering/ets/ |
H A D | tupleLowering.cpp | 43 isArgumentMemberExpression ? argument->AsMemberExpression()->Object()->TsType() : nullptr; in CheckUpdateArgument() 53 auto *const savedType = argument_->TsType(); in SetArgumentType() 63 *checker_->GetTupleElementAccessValue(argument_->AsMemberExpression()->Property()->TsType(), in ComputeTypes() 90 identClone->SetTsType(tmpVar->TsType()); in GenerateExpressions() 99 identClone->SetTsType(tmpVar->TsType()); in GenerateExpressions() 109 identClone->SetTsType(tmpVar2->TsType()); in GenerateExpressions() 133 gensym->SetTsType(tmpVar->TsType()); in GenerateSymbol() 142 argumentClone->Object()->SetTsType(memberExpr->Object()->TsType()); in CloneArgument() 146 argumentClone->Property()->SetTsType(memberExpr->Property()->TsType()); in CloneArgument() 150 argumentClone->SetTsType(memberExpr->TsType()); in CloneArgument() [all...] |
H A D | unionLowering.cpp | 118 CreateUnionFieldClassProperty(checker, vbind, expr->TsType(), expr->Property()->AsIdentifier()->Name())); in HandleUnionPropertyAccess() 147 auto *const unionType = expr->Expr()->TsType()->AsETSUnionType(); in HandleUnionCastToPrimitive() 148 auto *sourceType = unionType->FindExactOrBoxedType(checker, expr->TsType()); in HandleUnionCastToPrimitive() 151 expr->TsType()); in HandleUnionCastToPrimitive() 154 if (expr->TsType()->HasTypeFlag(checker::TypeFlag::ETS_PRIMITIVE)) { in HandleUnionCastToPrimitive() 185 if (ast->IsMemberExpression() && ast->AsMemberExpression()->Object()->TsType() != nullptr) { in Perform() 187 checker->GetApparentType(checker->GetNonNullishType(ast->AsMemberExpression()->Object()->TsType())); in Perform() 194 if (ast->IsTSAsExpression() && ast->AsTSAsExpression()->Expr()->TsType() != nullptr && in Perform() 195 ast->AsTSAsExpression()->Expr()->TsType()->IsETSUnionType() && in Perform() 196 ast->AsTSAsExpression()->TsType() ! in Perform() [all...] |
H A D | stringComparison.cpp | 62 if ((expr->Left()->TsType() == nullptr) || (expr->Right()->TsType() == nullptr)) { in IsStringComparison() 66 if (expr->Left()->TsType()->IsETSStringType() && expr->Right()->TsType()->IsETSStringType()) { in IsStringComparison() 76 ASSERT(expr->Left()->TsType()->IsETSStringType() && expr->Right()->TsType()->IsETSStringType()); in ProcessBinaryExpression()
|
H A D | lambdaLowering.cpp | 166 auto *newType = capturedVar->TsType()->Substitute(checker->Relation(), calleeParameterInfo.substitution); in CreateLambdaCalleeParameters() 187 auto *oldParamType = oldParam->AsETSParameterExpression()->Ident()->TypeAnnotation()->TsType(); in CreateLambdaCalleeParameters() 224 if (node->IsTyped() && node->AsTyped()->TsType() != nullptr) { in ProcessCalleeMethodBody() 225 node->AsTyped()->SetTsType(node->AsTyped()->TsType()->Substitute(checker->Relation(), substitution)); in ProcessCalleeMethodBody() 241 id->Variable()->SetTsType(id->Variable()->TsType()->Substitute(checker->Relation(), substitution)); in ProcessCalleeMethodBody() 282 calleeClass->Definition()->TsType()->AsETSObjectType()->AddProperty<checker::PropertyType::INSTANCE_METHOD>( in SetUpCalleeMethod() 285 calleeClass->Definition()->TsType()->AsETSObjectType()->AddProperty<checker::PropertyType::STATIC_METHOD>( in SetUpCalleeMethod() 293 calleeClass->Definition()->TsType()->AsETSObjectType()); in SetUpCalleeMethod() 313 funcScope->BindName(info->calleeClass->Definition()->TsType()->AsETSObjectType()->AssemblerName()); in GetAndApplyFunctionScope() 550 info->calleeClass->Definition()->TsType() in CreateLambdaClassFields() [all...] |
H A D | enumPostCheckLowering.cpp | 31 (argument->TsType()->AsETSEnumType()->*getMethod)().memberProxyType->Name(), checker->Allocator()); in CreateCall() 68 ASSERT((node->AsExpression()->TsType()->IsETSEnumType())); in Perform() 69 auto *enumIf = expr->TsType()->AsETSEnumType(); in Perform() 81 auto *enumIf = memberExpr->Object()->TsType()->AsETSEnumType(); in Perform()
|
H A D | bigintLowering.cpp | 53 auto left = expr->Left()->TsType(); in ReplaceStrictEqualByNormalEqual() 55 auto right = expr->Right()->TsType(); in ReplaceStrictEqualByNormalEqual() 76 auto left = expr->Left()->TsType(); in RemoveConst() 82 auto right = expr->Right()->TsType(); in RemoveConst()
|
H A D | opAssignment.cpp | 98 if (exprToProcess->TsType()->HasTypeFlag(checker::TypeFlag::ETS_PRIMITIVE)) { in AdjustBoxingUnboxingFlags() 100 } else if (exprToProcess->TsType()->IsETSObjectType()) { in AdjustBoxingUnboxingFlags() 107 auto *lcType = expr->TsType(); in CreateProxyTypeNode() 199 if (assignment->TsType() == nullptr) { // hasn't been through checker in HandleOpAssignment() 263 objType = object->TsType(); in ConstructUpdateResult() 271 propType = property->TsType(); in ConstructUpdateResult() 277 std::string suffix = (argument->TsType() == checker->GlobalETSBigIntType()) ? "n" : ""; in ConstructUpdateResult() 285 GetClone(allocator, id2), GetClone(allocator, id1), GetClone(allocator, id2), argument->TsType()); in ConstructUpdateResult() 295 argument->TsType(), GetClone(allocator, id1), GetClone(allocator, id2), in ConstructUpdateResult() 296 GetClone(allocator, id3), argument->TsType(), GetClon in ConstructUpdateResult() [all...] |
H A D | genericBridgesLowering.cpp | 57 typeNodes.emplace_back(checker->AllocNode<ir::OpaqueTypeNode>(baseParameters[i]->TsType())); 61 typeNodes.emplace_back(checker->AllocNode<ir::OpaqueTypeNode>(derivedParameter->TsType())); 70 checker->AllocNode<ir::OpaqueTypeNode>(const_cast<checker::Type *>(classDefinition->TsType()))); 108 classDefinition->TsType()->AsETSObjectType()); in AddGenericBridge() 114 auto *methodType = methodDefinition->Id()->Variable()->TsType()->AsETSFunctionType(); in AddGenericBridge() 138 classDefinition->TsType()->AsETSObjectType()); in ProcessScriptFunction() 158 checker::ETSFunctionType const *methodType = derivedMethod->Id()->Variable()->TsType()->AsETSFunctionType(); in ProcessScriptFunction() 195 classDefinition->Super()->TsType()->AsETSObjectType()->GetDeclNode()->AsClassDefinition(); in CreateGenericBridges() 201 auto const *const classType = classDefinition->TsType()->AsETSObjectType(); in CreateGenericBridges() 232 if (classDefinition->Super() == nullptr || classDefinition->Super()->TsType() in ProcessClassDefinition() [all...] |
H A D | constStringToCharLowering.cpp | 30 ast->AsExpression()->TsType() == nullptr || !ast->AsExpression()->TsType()->IsETSStringType()) { in TryConvertToCharLiteral() 34 auto type = ast->AsExpression()->TsType()->AsETSStringType(); in TryConvertToCharLiteral()
|
/arkcompiler/ets_frontend/ets2panda/ir/ets/ |
H A D | etsPrimitiveType.cpp | 104 return TsType(); in GetType() 108 return TsType(); in GetType() 112 return TsType(); in GetType() 116 return TsType(); in GetType() 120 return TsType(); in GetType() 124 return TsType(); in GetType() 128 return TsType(); in GetType() 132 return TsType(); in GetType()
|
/arkcompiler/ets_frontend/ets2panda/checker/types/ets/ |
H A D | etsFunctionType.cpp | 103 it->GetSignatureInfo()->typeParams, it->GetSignatureInfo()->params[ix]->TsType(), in ProcessSignatures() 104 target->GetSignatureInfo()->params[ix]->TsType(), substitution); in ProcessSignatures() 108 it->GetSignatureInfo()->typeParams, it->RestVar()->TsType(), target->RestVar()->TsType(), in ProcessSignatures() 119 if (!relation->IsAssignableTo(target->Params()[idx]->TsType(), it->Params()[idx]->TsType())) { in ProcessSignatures() 129 !relation->IsAssignableTo(target->RestVar()->TsType(), it->RestVar()->TsType())) { in ProcessSignatures() 226 relation->IsCastableTo(ourParams[i]->TsType(), theirParams[i]->TsType()); in CastFunctionParams() [all...] |
/arkcompiler/ets_frontend/ets2panda/checker/types/ts/ |
H A D | tupleType.cpp | 26 unionTypes.push_back(it->TsType()); in ConvertToArrayType() 42 (*it)->TsType()->ToString(ss, precise); in ToString() 61 (*it)->TsType()->ToString(ss, precise); in ToString() 88 relation->IsIdenticalTo(targetProp->TsType(), sourceProp->TsType()); in Identical() 124 Type *targetPropType = targetProp->TsType(); in AssignmentTarget() 125 Type *sourcePropType = sourceProperties[i]->TsType(); in AssignmentTarget()
|
/arkcompiler/ets_frontend/ets2panda/compiler/base/ |
H A D | lreference.cpp | 185 staticObjRef_ = memberExpr->Object()->TsType(); in ETSLReference() 191 TargetTypeContext ttctx(etsg_, memberExpr->Object()->TsType()); in ETSLReference() 197 TargetTypeContext pttctx(etsg_, memberExpr->Property()->TsType()); in ETSLReference() 281 if (auto const *const smartType = ident->TsType(); in GetValue() 282 !etsg_->Checker()->Relation()->IsIdenticalTo(smartType, variable->TsType())) { in GetValue() 292 const auto *const objectType = memberExpr->Object()->TsType(); in SetValueComputed() 315 const auto *sig = memberExpr->PropVar()->TsType()->AsETSFunctionType()->FindSetter(); in SetValueGetterSetter() 335 const auto *const memberExprTsType = memberExpr->Object()->TsType()->IsETSTupleType() in SetValue() 336 ? memberExpr->Object()->TsType()->AsETSTupleType()->ElementType() in SetValue() 337 : memberExpr->TsType(); in SetValue() [all...] |
/arkcompiler/ets_frontend/ets2panda/checker/ets/ |
H A D | aliveAnalyzer.cpp | 239 ASSERT(methodDef->TsType() && methodDef->TsType()->IsETSFunctionType()); in AnalyzeMethodDef() 240 const auto *returnType = methodDef->TsType()->AsETSFunctionType()->FindSignature(func)->ReturnType(); in AnalyzeMethodDef() 280 ASSERT(doWhile->Test()->TsType() && doWhile->Test()->TsType()->IsConditionalExprType()); in AnalyzeDoLoop() 281 const auto exprRes = doWhile->Test()->TsType()->ResolveConditionExpr(); in AnalyzeDoLoop() 290 ASSERT(whileStmt->Test()->TsType() && whileStmt->Test()->TsType()->IsConditionalExprType()); in AnalyzeWhileLoop() 291 const auto exprRes = whileStmt->Test()->TsType()->ResolveConditionExpr(); in AnalyzeWhileLoop() 308 ASSERT(forStmt->Test()->TsType() in AnalyzeForLoop() [all...] |
/arkcompiler/ets_frontend/ets2panda/ir/ts/ |
H A D | tsLiteralType.cpp | 65 if (TsType() != nullptr) { in GetType() 66 return TsType(); in GetType() 70 return TsType(); in GetType()
|
H A D | tsParenthesizedType.cpp | 65 if (TsType() != nullptr) { in GetType() 66 return TsType(); in GetType() 70 return TsType(); in GetType()
|
H A D | tsUnionType.cpp | 74 if (TsType() != nullptr) { in GetType() 75 return TsType(); in GetType() 85 return TsType(); in GetType()
|
H A D | tsIndexedAccessType.cpp | 71 if (TsType() != nullptr) { in GetType() 72 return TsType(); in GetType() 80 return TsType(); in GetType()
|
/arkcompiler/ets_frontend/ets2panda/declgen_ets2ts/ |
H A D | declgenEts2Ts.cpp | 213 GenType(state_.super->TsType()); in GenFunctionBody() 251 const auto *paramType = param->TsType(); in GenFunctionType() 266 GenType(sigInfo->restVar->TsType()); in GenFunctionType() 319 ASSERT(invoke && invoke->TsType() && invoke->TsType()->IsETSFunctionType()); in GenObjectType() 320 GenType(invoke->TsType()); in GenObjectType() 479 ASSERT(enumDecl->TsType()->IsETSIntEnumType()); in GenEnumDeclaration() 480 GenEnumType(enumDecl->TsType()->AsETSIntEnumType()); in GenEnumDeclaration() 544 GenType(super->TsType()); in GenClassDeclaration() 547 const auto &interfaces = classDef->TsType() in GenClassDeclaration() [all...] |