Home
last modified time | relevance | path

Searched refs:propType (Results 1 - 17 of 17) sorted by relevance

/arkcompiler/ets_frontend/ets2panda/checker/ts/
H A Dobject.cpp57 Type *propType = GetTypeOfVariable(it); in CheckIndexConstraints() local
58 IsTypeAssignableTo(propType, numberInfo->GetType(), in CheckIndexConstraints()
59 {"Property '", it->Name(), "' of type '", propType, in CheckIndexConstraints()
68 Type *propType = GetTypeOfVariable(it); in CheckIndexConstraints() local
69 IsTypeAssignableTo(propType, stringInfo->GetType(), in CheckIndexConstraints()
70 {"Property '", it->Name(), "' of type '", propType, in CheckIndexConstraints()
409 Type *propType = GetTypeOfVariable(prop); in GetPropertyTypeForIndexType() local
412 propType->AddTypeFlag(TypeFlag::READONLY); in GetPropertyTypeForIndexType()
415 return propType; in GetPropertyTypeForIndexType()
/arkcompiler/ets_frontend/ets2panda/compiler/core/
H A DETSGen.cpp384 void ETSGen::StoreStaticOwnProperty(const ir::AstNode *node, const checker::Type *propType, in StoreStaticOwnProperty() argument
388 StoreStaticProperty(node, propType, fullName); in StoreStaticOwnProperty()
391 void ETSGen::StoreStaticProperty(const ir::AstNode *const node, const checker::Type *propType, in StoreStaticProperty() argument
394 if (propType->HasTypeFlag(TYPE_FLAG_BYTECODE_REF)) { in StoreStaticProperty()
396 } else if (propType->HasTypeFlag(checker::TypeFlag::ETS_WIDE_NUMERIC)) { in StoreStaticProperty()
403 void ETSGen::LoadStaticProperty(const ir::AstNode *const node, const checker::Type *propType, in LoadStaticProperty() argument
406 if (propType->HasTypeFlag(TYPE_FLAG_BYTECODE_REF)) { in LoadStaticProperty()
408 } else if (propType->HasTypeFlag(checker::TypeFlag::ETS_WIDE_NUMERIC)) { in LoadStaticProperty()
414 SetAccumulatorType(propType); in LoadStaticProperty()
417 void ETSGen::StoreProperty(const ir::AstNode *const node, const checker::Type *propType, cons argument
431 LoadProperty(const ir::AstNode *const node, const checker::Type *propType, const VReg objReg, const util::StringView &fullName) LoadProperty() argument
445 StoreUnionProperty([[maybe_unused]] const ir::AstNode *node, [[maybe_unused]] const checker::Type *propType, [[maybe_unused]] VReg objReg, [[maybe_unused]] const util::StringView &propName) StoreUnionProperty() argument
462 LoadUnionProperty([[maybe_unused]] const ir::AstNode *const node, [[maybe_unused]] const checker::Type *propType, [[maybe_unused]] const VReg objReg, [[maybe_unused]] const util::StringView &propName) LoadUnionProperty() argument
480 StorePropertyDynamic(const ir::AstNode *node, const checker::Type *propType, VReg objReg, const util::StringView &propName) StorePropertyDynamic() argument
528 LoadPropertyDynamic(const ir::AstNode *node, const checker::Type *propType, VReg objReg, const util::StringView &propName) LoadPropertyDynamic() argument
[all...]
H A DETSGen.h61 void LoadStaticProperty(const ir::AstNode *node, const checker::Type *propType, const util::StringView &fullName);
62 void StoreStaticProperty(const ir::AstNode *node, const checker::Type *propType, const util::StringView &fullName);
64 void StoreStaticOwnProperty(const ir::AstNode *node, const checker::Type *propType, const util::StringView &name);
68 void StoreProperty(const ir::AstNode *node, const checker::Type *propType, VReg objReg,
70 void LoadProperty(const ir::AstNode *node, const checker::Type *propType, VReg objReg,
72 void StorePropertyDynamic(const ir::AstNode *node, const checker::Type *propType, VReg objReg,
74 void LoadPropertyDynamic(const ir::AstNode *node, const checker::Type *propType, VReg objReg,
80 void StoreUnionProperty(const ir::AstNode *node, const checker::Type *propType, VReg objReg,
82 void LoadUnionProperty(const ir::AstNode *node, const checker::Type *propType, VReg objReg,
H A DETSCompiler.cpp315 if (auto propType = expr->Callee()->AsMemberExpression()->Property()->TsType(); in MaybeCastUnionTypeToFunctionType()
316 propType != nullptr && propType->IsETSFunctionType() && objType->IsETSUnionType()) { in MaybeCastUnionTypeToFunctionType()
/arkcompiler/ets_frontend/es2panda/ir/expressions/
H A DunaryExpression.cpp129 checker::Type *propType = argument_->Check(checker); in Check() local
143 ASSERT(propType->Variable()); in Check()
145 if (propType->Variable()->HasFlag(binder::VariableFlags::READONLY)) { in Check()
150 if (!propType->Variable()->HasFlag(binder::VariableFlags::OPTIONAL)) { in Check()
H A DmemberExpression.cpp154 checker::Type *propType = checker->GetTypeOfVariable(prop); in Check() local
156 propType->AddTypeFlag(checker::TypeFlag::READONLY); in Check()
159 return propType; in Check()
H A DobjectExpression.cpp681 checker::Type *propType = GetTypeForProperty(prop, checker); in Check() local
690 propType = checker->GetBaseTypeOfLiteralType(propType); in Check()
693 memberVar->SetTsType(propType); in Check()
703 foundMember->SetTsType(propType); in Check()
/arkcompiler/ets_frontend/es2panda/typescript/core/
H A Dobject.cpp59 Type *propType = GetTypeOfVariable(it); in CheckIndexConstraints() local
60 IsTypeAssignableTo(propType, numberInfo->GetType(), in CheckIndexConstraints()
61 {"Property '", it->Name(), "' of type '", propType, in CheckIndexConstraints()
70 Type *propType = GetTypeOfVariable(it); in CheckIndexConstraints() local
71 IsTypeAssignableTo(propType, stringInfo->GetType(), in CheckIndexConstraints()
72 {"Property '", it->Name(), "' of type '", propType, in CheckIndexConstraints()
422 Type *propType = GetTypeOfVariable(prop); in GetPropertyTypeForIndexType() local
425 propType->AddTypeFlag(TypeFlag::READONLY); in GetPropertyTypeForIndexType()
428 return propType; in GetPropertyTypeForIndexType()
/arkcompiler/ets_frontend/ets2panda/compiler/lowering/ets/
H A DopAssignment.cpp247 checker::Type *propType = checker->GlobalVoidType(); in ConstructUpdateResult() local
271 propType = property->TsType(); in ConstructUpdateResult()
284 newAssignmentStatements, id1, object, objType, id2, property, propType, GetClone(allocator, id1), in ConstructUpdateResult()
293 return parser->CreateFormattedExpression(newAssignmentStatements, id1, object, objType, id2, property, propType, in ConstructUpdateResult()
/arkcompiler/ets_frontend/ets2panda/checker/ets/
H A Dobject.cpp1697 void ETSChecker::ValidateReadonlyProperty(const ir::MemberExpression *const memberExpr, const ETSFunctionType *propType,
1704 classProp = FindClassProperty(currentObj, propType);
1727 auto *propType = prop->TsType()->AsETSFunctionType();
1728 ASSERT((propType->FindGetter() != nullptr) == propType->HasTypeFlag(TypeFlag::GETTER));
1729 ASSERT((propType->FindSetter() != nullptr) == propType->HasTypeFlag(TypeFlag::SETTER));
1735 if (!propType->HasTypeFlag(TypeFlag::GETTER)) {
1739 ValidateSignatureAccessibility(memberExpr->ObjType(), callExpr, propType->FindGetter(), sourcePos);
1743 ValidateReadonlyProperty(memberExpr, propType, sourcePo
[all...]
H A DutilityTypeHandlers.cpp492 classType->UpdateTypeProperties(this, [this](auto *property, auto *propType) { in MakePropertiesReadonly()
496 propCopy->SetTsType(propType); in MakePropertiesReadonly()
570 auto *const propType = prop->TsType(); in MakePropertyNonNullish() local
571 auto *const nonNullishPropType = GetNonNullishType(propType); in MakePropertyNonNullish()
H A DtypeCheckingHelpers.cpp373 auto *propType = var->TsType()->AsETSFunctionType();
374 if (propType->HasTypeFlag(checker::TypeFlag::GETTER)) {
375 return propType->FindGetter()->ReturnType();
377 return propType->FindSetter()->Params()[0]->TsType();
/arkcompiler/ets_frontend/ets2panda/checker/
H A DTSAnalyzer.cpp659 checker::Type *propType = checker->GetTypeOfVariable(prop); in Check() local
661 propType->AddTypeFlag(checker::TypeFlag::READONLY); in Check()
664 return propType; in Check()
784 checker::Type *propType = GetTypeForProperty(prop, checker); in CheckNonComputed() local
793 propType = checker->GetBaseTypeOfLiteralType(propType); in CheckNonComputed()
796 memberVar->SetTsType(propType); in CheckNonComputed()
806 foundMember->SetTsType(propType); in CheckNonComputed()
939 checker::Type *propType = expr->argument_->Check(checker); in CheckDeleteKeyword() local
944 if (propType in CheckDeleteKeyword()
[all...]
H A DETSAnalyzer.cpp1546 auto *propType = checker->GetTypeOfVariable(lv); in CheckObjectExprProps() local
1547 key->SetTsType(propType); in CheckObjectExprProps()
1550 value->AsObjectExpression()->SetPreferredType(propType); in CheckObjectExprProps()
1556 const checker::Type *targetType = checker->TryGettingFunctionTypeFromInvokeFunction(propType); in CheckObjectExprProps()
1559 checker->Relation(), value, valueType, propType, value->Start(), in CheckObjectExprProps()
H A DETSchecker.h778 ir::ClassProperty *FindClassProperty(const ETSObjectType *objectType, const ETSFunctionType *propType);
781 void ValidateReadonlyProperty(const ir::MemberExpression *memberExpr, const ETSFunctionType *propType,
/arkcompiler/ets_frontend/es2panda/compiler/core/emitter/
H A Demitter.cpp877 auto propType = prop->TypeAnnotation()->Type(); in CreateAnnotationProp() local
879 if (propType == ir::AstNodeType::TS_NUMBER_KEYWORD) { in CreateAnnotationProp()
895 } else if (propType == ir::AstNodeType::TS_BOOLEAN_KEYWORD) { in CreateAnnotationProp()
902 } else if (propType == ir::AstNodeType::TS_STRING_KEYWORD) { in CreateAnnotationProp()
910 } else if (propType == ir::AstNodeType::TS_ARRAY_TYPE) { in CreateAnnotationProp()
912 } else if (propType == ir::AstNodeType::TS_TYPE_REFERENCE) { in CreateAnnotationProp()
/arkcompiler/ets_frontend/ets2panda/checker/types/ets/
H A DetsObjectType.cpp928 auto *const propType = prop->Declaration()->Node()->Check(checker); in UpdateTypeProperty() local
930 auto *const propCopy = func(prop, propType); in UpdateTypeProperty()

Completed in 28 milliseconds