Home
last modified time | relevance | path

Searched refs:checker_ (Results 1 – 24 of 24) sorted by relevance

/arkcompiler/ets_frontend/ets2panda/checker/ets/
DtypeRelationContext.cpp44 checker_->CheckNumberOfTypeArguments(type, typeArgs, pos); in ValidateTypeArguments()
70 … : checker_->MaybePromotedBuiltinType(typeArgs->Params().at(idx)->GetType(checker_))}; in ValidateTypeArguments()
73 auto *const substitution = checker_->NewSubstitution(); in ValidateTypeArguments()
77 checker_->CheckValidGenericTypeParameter(typeArg, pos); in ValidateTypeArguments()
78 typeArg->Substitute(checker_->Relation(), substitution); in ValidateTypeArguments()
87 …auto *const constraint = typeParam->GetConstraintType()->Substitute(checker_->Relation(), substitu… in ValidateTypeArguments()
90 !checker_->Relation()->NoThrowGenericTypeAlias()) { in ValidateTypeArguments()
91checker_->ThrowTypeError({"Type '", typeArg, "' is not assignable to constraint type '", constrain… in ValidateTypeArguments()
105 return checker_->Relation()->IsAssignableTo(typeArg, constraintType); in ValidateTypeArg()
110 ArenaVector<Type *> typeArgTypes(checker_->Allocator()->Adapter()); in InstantiateType()
[all …]
DtypeConverter.cpp20 : checker_(checker), relation_(relation), target_(target), source_(source) in TypeConverter()
51 return checker_; in Checker()
DaliveAnalyzer.cpp161 checker_->ThrowTypeError("Initializer must be able to complete normally.", node->Start()); in AnalyzeDef()
172 checker_->ThrowTypeError("Unreachable statement.", node->Start()); in AnalyzeStat()
277 …const auto isVoid = returnType->IsETSVoidType() || returnType == checker_->GlobalBuiltinVoidType(); in AnalyzeMethodDef()
283 isPromiseVoid = asAsync->GetPromiseTypeArg() == checker_->GlobalBuiltinVoidType(); in AnalyzeMethodDef()
287checker_->ThrowTypeError("Function with a non void return type must return a value.", func->Id()->… in AnalyzeMethodDef()
407 …if (callExpr->Signature()->ReturnType() == checker_->GetGlobalTypesHolder()->GlobalBuiltinNeverTyp… in AnalyzeCall()
439 checker_->Warning("Possible fall-through into case", caseClause->Start()); in AnalyzeSwitch()
DaliveAnalyzer.h37 AliveAnalyzer(const ir::AstNode *node, ETSChecker *checker) : BaseAnalyzer(), checker_(checker) in AliveAnalyzer()
83 ETSChecker *checker_; variable
DtypeRelationContext.h140 : checker_(checker) in InstantiationContext()
150 : checker_(checker) in InstantiationContext()
174 ETSChecker *checker_; variable
DtypeConverter.h35 ETSChecker *checker_;
/arkcompiler/ets_frontend/es2panda/typescript/core/
DdestructuringContext.cpp33 typeAnnotation->Check(checker_); in Prepare()
34 Type *annotationType = typeAnnotation->AsTypeNode()->GetType(checker_); in Prepare()
37 checker_->ElaborateElementwise(annotationType, initializer, loc); in Prepare()
50 inferedType_ = initializer->Check(checker_); in Prepare()
58 checker_->ThrowTypeError({"Cannot find name '", ident->Name(), "'."}, ident->Start()); in HandleDestructuringAssignment()
64 if (defaultType && !checker_->IsTypeAssignableTo(defaultType, variable->TsType())) { in HandleDestructuringAssignment()
65 checker_->ThrowAssignmentError(defaultType, variable->TsType(), ident->Start()); in HandleDestructuringAssignment()
68 if (inferedType && !checker_->IsTypeAssignableTo(inferedType, variable->TsType())) { in HandleDestructuringAssignment()
69 checker_->ThrowAssignmentError(inferedType, variable->TsType(), ident->Start()); in HandleDestructuringAssignment()
78 if (!checker_->HasStatus(CheckerStatus::IN_CONST_CONTEXT)) { in SetInferedTypeForVariable()
[all …]
DtypeElaborationContext.cpp31 ArenaVector<Type *> bestMatchingType(checker_->Allocator()->Adapter()); in GetBestMatchingType()
32 … Type *sourceType = sourceNode ? checker_->CheckTypeCached(sourceNode) : checker_->GlobalAnyType(); in GetBestMatchingType()
35 Type *currentType = checker_->GetPropertyTypeForIndexType(*it, indexType); in GetBestMatchingType()
42 if (!checker_->IsTypeAssignableTo(sourceType, currentType)) { in GetBestMatchingType()
51 return checker_->CreateUnionType(std::move(bestMatchingType)); in GetBestMatchingType()
65 util::StringView memberIndex = util::Helpers::ToStringView(checker_->Allocator(), index_); in Start()
70 … targetElementType = GetBestMatchingType(checker_->CreateStringLiteralType(memberIndex), it); in Start()
73checker_->GetPropertyTypeForIndexType(targetType_, checker_->CreateStringLiteralType(memberIndex)); in Start()
80 checker_->ElaborateElementwise(targetElementType, it, it->Start()); in Start()
112 propKeyType = checker_->CheckComputedPropertyName(prop->Key()); in Start()
[all …]
DtypeElaborationContext.h36 : checker_(checker), in ElaborationContext()
51 Checker *checker_;
DdestructuringContext.h36 …: checker_(checker), id_(id), inAssignment_(inAssignment), convertTupleToArray_(convertTupleToArra… in DestructuringContext()
76 Checker *checker_;
/arkcompiler/ets_frontend/ets2panda/checker/ts/
DdestructuringContext.cpp34 typeAnnotation->Check(checker_); in Prepare()
35 Type *annotationType = typeAnnotation->GetType(checker_); in Prepare()
38 checker_->ElaborateElementwise(annotationType, initializer, loc); in Prepare()
51 inferredType_ = initializer->Check(checker_); in Prepare()
58 checker_->ThrowTypeError({"Cannot find name '", ident->Name(), "'."}, ident->Start()); in HandleDestructuringAssignment()
64 if (defaultType != nullptr && !checker_->IsTypeAssignableTo(defaultType, variable->TsType())) { in HandleDestructuringAssignment()
65 checker_->ThrowAssignmentError(defaultType, variable->TsType(), ident->Start()); in HandleDestructuringAssignment()
68 … if (inferredType != nullptr && !checker_->IsTypeAssignableTo(inferredType, variable->TsType())) { in HandleDestructuringAssignment()
69 checker_->ThrowAssignmentError(inferredType, variable->TsType(), ident->Start()); in HandleDestructuringAssignment()
78 if (!checker_->HasStatus(CheckerStatus::IN_CONST_CONTEXT)) { in SetInferredTypeForVariable()
[all …]
DtypeElaborationContext.cpp31 ArenaVector<Type *> bestMatchingType(checker_->Allocator()->Adapter()); in GetBestMatchingType()
32 …Type *sourceType = sourceNode != nullptr ? checker_->CheckTypeCached(sourceNode) : checker_->Globa… in GetBestMatchingType()
35 Type *currentType = checker_->GetPropertyTypeForIndexType(*it, indexType); in GetBestMatchingType()
42 if (!checker_->IsTypeAssignableTo(sourceType, currentType)) { in GetBestMatchingType()
51 return checker_->CreateUnionType(std::move(bestMatchingType)); in GetBestMatchingType()
65 util::StringView memberIndex = util::Helpers::ToStringView(checker_->Allocator(), index_); in Start()
70 … targetElementType = GetBestMatchingType(checker_->CreateStringLiteralType(memberIndex), it); in Start()
73checker_->GetPropertyTypeForIndexType(targetType_, checker_->CreateStringLiteralType(memberIndex)); in Start()
80 checker_->ElaborateElementwise(targetElementType, it, it->Start()); in Start()
112 propKeyType = checker_->CheckComputedPropertyName(prop->Key()); in Start()
[all …]
DtypeElaborationContext.h36 : checker_(checker), in ElaborationContext()
52 TSChecker *checker_;
DdestructuringContext.h36 …: checker_(checker), id_(id), inAssignment_(inAssignment), convertTupleToArray_(convertTupleToArra… in DestructuringContext()
75 TSChecker *checker_;
/arkcompiler/ets_frontend/es2panda/typescript/types/
DtypeRelation.cpp29 TypeRelation::TypeRelation(Checker *checker) : checker_(checker), result_(RelationResult::FALSE) {} in TypeRelation()
38 return checker_; in GetChecker()
43 return checker_; in GetChecker()
48 return checker_->Allocator(); in Allocator()
82 result_ = CacheLookup(source, target, checker_->IdenticalResults(), RelationType::IDENTICAL); in IsIdenticalTo()
84 checker_->ResolveStructuredTypeMembers(source); in IsIdenticalTo()
85 checker_->ResolveStructuredTypeMembers(target); in IsIdenticalTo()
88checker_->IdenticalResults().cached.insert({{source->Id(), target->Id()}, {result_, RelationType::… in IsIdenticalTo()
122 result_ = CacheLookup(source, target, checker_->AssignableResults(), RelationType::ASSIGNABLE); in IsAssignableTo()
134 checker_->AssignableResults().cached.insert( in IsAssignableTo()
[all …]
DtypeRelation.h108 Checker *checker_; variable
/arkcompiler/ets_frontend/ets2panda/checker/types/
DtypeRelation.cpp25 return checker_->Allocator(); in Allocator()
59 result_ = CacheLookup(source, target, checker_->IdenticalResults(), RelationType::IDENTICAL); in IsIdenticalTo()
61 checker_->ResolveStructuredTypeMembers(source); in IsIdenticalTo()
62 checker_->ResolveStructuredTypeMembers(target); in IsIdenticalTo()
65checker_->IdenticalResults().cached.insert({{source->Id(), target->Id()}, {result_, RelationType::… in IsIdenticalTo()
100 result_ = CacheLookup(source, target, checker_->AssignableResults(), RelationType::ASSIGNABLE); in IsAssignableTo()
113 checker_->AssignableResults().cached.insert( in IsAssignableTo()
123 result_ = CacheLookup(source, target, checker_->ComparableResults(), RelationType::COMPARABLE); in IsComparableTo()
139 checker_->ComparableResults().cached.insert( in IsComparableTo()
148 …result_ = CacheLookup(source, target, checker_->UncheckedCastableResult(), RelationType::UNCHECKED… in IsCastableTo()
[all …]
DtypeRelation.h131 …: checker_(checker), result_(RelationResult::FALSE), instantiationRecursionMap_(Allocator()->Adapt… in TypeRelation()
212 return checker_; in GetChecker()
222 return checker_; in GetChecker()
306 Checker *checker_; variable
/arkcompiler/ets_frontend/ets2panda/checker/
Dchecker.h226 : checker_(checker), element_(element) in TypeStackElement()
229 checker_->ThrowTypeError(list, pos); in TypeStackElement()
234 : checker_(checker), element_(element) in TypeStackElement()
237 checker_->ThrowTypeError(err, pos); in TypeStackElement()
243 checker_->typeStack_.erase(element_); in ~TypeStackElement()
250 Checker *checker_;
257 : checker_(checker), prevScope_(checker_->scope_) in ScopeContext()
259 checker_->scope_ = newScope; in ScopeContext()
264 checker_->scope_ = prevScope_; in ~ScopeContext()
271 Checker *checker_;
[all …]
DSemanticAnalyzer.h174 checker_ = checker; in SemanticAnalyzer()
193 return checker_; in AST_NODE_REINTERPRET_MAPPING()
197 Checker *checker_;
/arkcompiler/ets_frontend/ets2panda/compiler/core/
DcompilerContext.h49 …: varbinder_(varbinder), checker_(checker), options_(std::move(options)), codeGenCb_(std::move(cod… in CompilerContext()
65 return checker_; in Checker()
136 checker::Checker *checker_; variable
/arkcompiler/ets_frontend/es2panda/typescript/
Dchecker.h501 …copeContext(Checker *checker, binder::Scope *newScope) : checker_(checker), prevScope_(checker_->s… in ScopeContext()
503 checker_->scope_ = newScope; in ScopeContext()
508 checker_->scope_ = prevScope_; in ~ScopeContext()
515 Checker *checker_;
522 : checker_(checker), prev_(checker->context_) in SavedCheckerContext()
524 checker_->context_ = CheckerContext(newStatus); in SavedCheckerContext()
532 checker_->context_ = prev_; in ~SavedCheckerContext()
536 Checker *checker_;
/arkcompiler/ets_frontend/ets2panda/util/
DdeclgenEts2Ts.h32 : checker_(checker), program_(program) in TSDeclGen()
97 checker::ETSChecker *checker_ {};
DdeclgenEts2Ts.cpp166 if (checker_->IsTypeBuiltinType(checkerType)) { in GenTypeNonNullish()
339 GenType(constraint->GetType(checker_)); in GenTypeParameters()
406 const auto *aliasedType = typeAlias->TypeAnnotation()->GetType(checker_); in GenTypeAliasDeclaration()