Lines Matching full:source
26 void Identity(TypeRelation *const relation, Type *const source, Type *const target) in Identity() argument
28 relation->IsIdenticalTo(source, target); in Identity()
31 void WideningPrimitive(TypeRelation *const relation, Type *const source, Type *const target) in WideningPrimitive() argument
33 ES2PANDA_ASSERT(source->IsETSPrimitiveType() && target->IsETSPrimitiveType()); in WideningPrimitive()
35 WideningConverter(relation->GetChecker()->AsETSChecker(), relation, target, source); in WideningPrimitive()
38 void NarrowingPrimitive(TypeRelation *const relation, Type *const source, Type *const target) in NarrowingPrimitive() argument
40 ES2PANDA_ASSERT(source->IsETSPrimitiveType() && target->IsETSPrimitiveType()); in NarrowingPrimitive()
42 NarrowingConverter(relation->GetChecker()->AsETSChecker(), relation, target, source); in NarrowingPrimitive()
45 void WideningNarrowingPrimitive(TypeRelation *const relation, ByteType *const source, CharType *con… in WideningNarrowingPrimitive() argument
48 WideningPrimitive(relation, source, tempInt); in WideningNarrowingPrimitive()
55 void WideningReference(TypeRelation *const relation, ETSObjectType *const source, ETSObjectType *co… in WideningReference() argument
57 relation->IsSupertypeOf(target, source); in WideningReference()
60 void WideningReference(TypeRelation *const relation, ETSArrayType *const source, ETSObjectType *con… in WideningReference() argument
62 relation->IsSupertypeOf(target, source); in WideningReference()
65 void WideningReference(TypeRelation *const relation, ETSArrayType *const source, ETSArrayType *cons… in WideningReference() argument
67 relation->IsSupertypeOf(target, source); in WideningReference()
72 …NarrowingReferenceConversionObjectObject(TypeRelation *const relation, ETSObjectType *const source, in IsAllowedNarrowingReferenceConversionObjectObject() argument
78 if (relation->IsSupertypeOf(target, source) || relation->IsSupertypeOf(source, target)) { in IsAllowedNarrowingReferenceConversionObjectObject()
83 …if (source->HasObjectFlag(ETSObjectFlags::INTERFACE) && target->HasObjectFlag(ETSObjectFlags::INTE… in IsAllowedNarrowingReferenceConversionObjectObject()
88 …if (source->HasObjectFlag(ETSObjectFlags::CLASS) && target->HasObjectFlag(ETSObjectFlags::INTERFAC… in IsAllowedNarrowingReferenceConversionObjectObject()
89 !source->GetDeclNode()->IsFinal()) { in IsAllowedNarrowingReferenceConversionObjectObject()
95 …if (source->HasObjectFlag(ETSObjectFlags::CLASS) && target->HasObjectFlag(ETSObjectFlags::INTERFAC… in IsAllowedNarrowingReferenceConversionObjectObject()
96 source->GetDeclNode()->IsFinal() && relation->IsSupertypeOf(source, target)) { in IsAllowedNarrowingReferenceConversionObjectObject()
102 …if (source->HasObjectFlag(ETSObjectFlags::INTERFACE) && target->HasObjectFlag(ETSObjectFlags::CLAS… in IsAllowedNarrowingReferenceConversionObjectObject()
103 relation->IsSupertypeOf(target, source)) { in IsAllowedNarrowingReferenceConversionObjectObject()
108 …return relation->IsIdenticalTo(etsChecker->GetNonConstantType(source), etsChecker->GetNonConstantT… in IsAllowedNarrowingReferenceConversionObjectObject()
111 bool IsAllowedNarrowingReferenceConversion(TypeRelation *const relation, Type *const source, Type *… in IsAllowedNarrowingReferenceConversion() argument
113 ES2PANDA_ASSERT(source->HasTypeFlag(checker::TypeFlag::ETS_ARRAY_OR_OBJECT) && in IsAllowedNarrowingReferenceConversion()
122 if (relation->IsSupertypeOf(target, source)) { in IsAllowedNarrowingReferenceConversion()
132 if (source->HasTypeFlag(TypeFlag::ETS_OBJECT) && target->HasTypeFlag(TypeFlag::ETS_OBJECT)) { in IsAllowedNarrowingReferenceConversion()
133 if (IsAllowedNarrowingReferenceConversionObjectObject(relation, source->AsETSObjectType(), in IsAllowedNarrowingReferenceConversion()
139 if (source->HasTypeFlag(TypeFlag::ETS_OBJECT) && target->HasTypeFlag(TypeFlag::ETS_ARRAY)) { in IsAllowedNarrowingReferenceConversion()
146 if (source->HasTypeFlag(TypeFlag::ETS_OBJECT) && target->HasTypeFlag(TypeFlag::ETS_TUPLE)) { in IsAllowedNarrowingReferenceConversion()
153 if (source->HasTypeFlag(TypeFlag::ETS_ARRAY) && target->HasTypeFlag(TypeFlag::ETS_ARRAY)) { in IsAllowedNarrowingReferenceConversion()
156 auto *sc = source->AsETSArrayType()->ElementType(); in IsAllowedNarrowingReferenceConversion()
189 … [[maybe_unused]] Type *const source, [[maybe_unused]] Type *const target) in IsUncheckedNarrowingReferenceConversion() argument
191 ES2PANDA_ASSERT(source->HasTypeFlag(checker::TypeFlag::ETS_ARRAY_OR_OBJECT) && in IsUncheckedNarrowingReferenceConversion()
209 void NarrowingReferenceImpl(TypeRelation *const relation, Type *const source, Type *const target) in NarrowingReferenceImpl() argument
213 if (!IsAllowedNarrowingReferenceConversion(relation, source, target)) { in NarrowingReferenceImpl()
218 if (!IsUncheckedNarrowingReferenceConversion(relation, source, target)) { in NarrowingReferenceImpl()
226 void NarrowingReference(TypeRelation *const relation, ETSObjectType *const source, ETSObjectType *c… in NarrowingReference() argument
228 NarrowingReferenceImpl(relation, source, target); in NarrowingReference()
231 void NarrowingReference(TypeRelation *const relation, ETSArrayType *const source, ETSArrayType *con… in NarrowingReference() argument
233 if (source->ElementType()->IsETSArrayType() && target->ElementType()->IsETSArrayType()) { in NarrowingReference()
234 …NarrowingReference(relation, source->ElementType()->AsETSArrayType(), target->ElementType()->AsETS… in NarrowingReference()
238 NarrowingReferenceImpl(relation, source, target); in NarrowingReference()
241 void NarrowingReference(TypeRelation *const relation, ETSObjectType *const source, ETSArrayType *co… in NarrowingReference() argument
244 NarrowingReference(relation, source, target->ElementType()->AsETSArrayType()); in NarrowingReference()
248 NarrowingReferenceImpl(relation, source, target); in NarrowingReference()
251 void NarrowingReference(TypeRelation *const relation, ETSObjectType *const source, ETSTupleType *co… in NarrowingReference() argument
253 NarrowingReferenceImpl(relation, source, target); in NarrowingReference()
263 ETSObjectType *Boxing(TypeRelation *const relation, Type *const source) in Boxing() argument
266 const BoxingConverter boxed(etsChecker, relation, source); in Boxing()
275 Type *Unboxing(TypeRelation *const relation, ETSObjectType *const source) in Unboxing() argument
278 const UnboxingConverter unboxed(etsChecker, relation, source); in Unboxing()
287 void UnboxingWideningPrimitive(TypeRelation *const relation, ETSObjectType *const source, Type *con… in UnboxingWideningPrimitive() argument
289 auto *const unboxedSource = Unboxing(relation, source); in UnboxingWideningPrimitive()
298 void UnboxingNarrowingPrimitive(TypeRelation *const relation, ETSObjectType *const source, Type *co… in UnboxingNarrowingPrimitive() argument
300 auto *const unboxedSource = Unboxing(relation, source); in UnboxingNarrowingPrimitive()
308 void UnboxingWideningNarrowingPrimitive(TypeRelation *const relation, ETSObjectType *const source, … in UnboxingWideningNarrowingPrimitive() argument
310 auto *const unboxedSource = Unboxing(relation, source); in UnboxingWideningNarrowingPrimitive()
318 void NarrowingReferenceUnboxing(TypeRelation *const relation, ETSObjectType *const source, Type *co… in NarrowingReferenceUnboxing() argument
325 NarrowingReference(relation, source, boxedTarget->AsETSObjectType()); in NarrowingReferenceUnboxing()
332 void BoxingWideningReference(TypeRelation *const relation, Type *const source, ETSObjectType *const… in BoxingWideningReference() argument
334 auto *const boxedSource = Boxing(relation, source); in BoxingWideningReference()
343 void String(TypeRelation *const relation, Type *const source) in String() argument
345 if (source->HasTypeFlag(TypeFlag::BYTE | TypeFlag::SHORT)) { in String()
347 WideningPrimitive(relation, source, tempInt); in String()
352 …if (source->HasTypeFlag(TypeFlag::ETS_BOOLEAN | TypeFlag::CHAR | TypeFlag::INT | TypeFlag::LONG | … in String()
354 Boxing(relation, source); in String()
358 ES2PANDA_ASSERT(source->HasTypeFlag(TypeFlag::ETS_OBJECT)); in String()