UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SemanticTypes.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2// uLang Compiler Public API
3
4#pragma once
5
21#include <cmath> // isnan
22
23#define UE_API VERSECOMPILER_API
24
25namespace uLang
26{
27
28// Forward Declaration
29struct SQualifier;
30class CSymbol;
31class CClass;
32class CInterface;
33class CDefinition;
34class CFunctionType;
35class CAstPackage;
36class CExpressionBase;
37class CFlowType;
38class CFunction;
39class CNamedType;
40class CNormalType;
41class CNominalType;
42class CScope;
43class CSemanticProgram;
44class CTypeVariable;
45class CTupleType;
46class CUnknownType;
47class CAliasType;
48class CClassDefinition;
49class CDataDefinition;
50class CCastableType;
51class CConcreteType;
52
53// NOTE: (YiLiangSiew) Currently, Visual Verse relies on the numerical values of these enumerations. If you
54// change this, be sure to update `BaseVisualVerseSettings.ini` as well.
55// Ensure to update uLangToolchainDependencies.natvis if the numerical values of these enumerations are changed.
56#define VERSE_ENUM_SEMANTIC_TYPE_KINDS(v) \
57 v(Unknown, CUnknownType)\
58 v(False, CFalseType) /* false, the type containing no possible values */ \
59 v(True, CTrueType) /* true, the type containing one possible value: false */ \
60 v(Void, CVoidType) /* void, a functor that maps any value to false */ \
61 v(Any, CAnyType) /* any, the top type that contains all possible values */ \
62 v(Comparable, CComparableType) /* comparable, top type of all comparable types */ \
63 v(Logic, CLogicType) /* logic */ \
64 v(Int, CIntType) /* int */ \
65 v(Rational, CRationalType) /* rational */ \
66 v(Float, CFloatType) /* float */ \
67 v(Char8, CChar8Type) /* char/char8 */ \
68 v(Char32, CChar32Type) /* char32 */ \
69 v(Path, CPathType) /* path */ \
70 v(Range, CRangeType) /* an internal type of ranges */ \
71 v(Type, CTypeType) /* type, the type of types */ \
72 v(Class, CClass) \
73 v(Module, CModule) \
74 v(Enumeration, CEnumeration) \
75 v(Array, CArrayType) \
76 v(Generator, CGeneratorType) \
77 v(Map, CMapType) \
78 v(Pointer, CPointerType) \
79 v(Reference, CReferenceType) \
80 v(Option, COptionType) \
81 v(Interface, CInterface) \
82 v(Tuple, CTupleType) \
83 v(Function, CFunctionType) \
84 v(Variable, CTypeVariable) \
85 v(Named, CNamedType) \
86 v(Persistable, CPersistableType) \
87 v(Castable, CCastableType) \
88 v(Concrete, CConcreteType)
89
90
91enum class ETypeKind : uint8_t
92{
93#define VISIT_KIND(Name, CppType) Name,
95#undef VISIT_KIND
96};
98
100{
101 Min = 0,
102 List = 0, // a,b or a;b
103 Definition = 1, // a:=b or a:b
104 Comparison = 2, // a<=b
105 To = 3, // a->b
106 Call = 4, // a()
107};
108
109// Characterizes whether a type is comparable and hashable, just comparable, or incomparable.
110// The comparable and hashable vs just comparable distinction is necessary as a temporary limitation of the FProperty-based implementation,
111// which doesn't implement hashing for all the types it implements comparison for.
118
119// See EFunctionStringFlag.
121{
122 Simple,
124};
125
127{
128 None = 0,
129 Castable = 1 << 0,
130 Concrete = 1 << 1,
131};
133
135
138{
139public:
141 virtual ~CTypeBase() {}
142
143 CSemanticProgram& GetProgram() const { return _Program; }
144
146 virtual const CNormalType& GetNormalType() const = 0;
147
148 virtual CNamedType* AsNamedType() { return nullptr; }
149
150 virtual const CNamedType* AsNamedType() const { return nullptr; }
151
152 virtual CFlowType* AsFlowType() { return nullptr; }
153
154 virtual const CFlowType* AsFlowType() const { return nullptr; }
155
156 virtual const CAliasType* AsAliasType() const { return nullptr; }
157
158 virtual bool CanBeCustomAccessorDataType() const = 0;
159
160 virtual bool CanBePredictsVarDataType() const { return false; }
161
172
176 bool bLinkable,
177 ETypeStringFlag Flag) const = 0;
178
187
198
207
208private:
209 friend class CSemanticProgram;
210 CSemanticProgram& _Program;
211 mutable TURefArray<CTupleType> _TupleTypesStartingWithThisType;
212 mutable TURefArray<CFunctionType> _FunctionTypesWithThisParameterType;
213};
214
216class CNormalType : public CTypeBase
217{
218public:
220
221 ETypeKind GetKind() const { return _Kind; }
222
223 template<typename TType>
224 TType& AsChecked() { ULANG_ASSERTF(IsA<TType>(), "Failed to cast Type."); return *static_cast<TType*>(this); }
225
226 template<typename TType>
227 TType const& AsChecked() const { ULANG_ASSERTF(IsA<TType>(), "Failed to cast Type."); return *static_cast<const TType*>(this); }
228
229 template<typename TType>
230 bool IsA() const { return _Kind == TType::StaticTypeKind; }
231
232 template<typename TType>
233 TType* AsNullable() { return IsA<TType>() ? static_cast<TType*>(this) : nullptr; }
234
235 template<typename TType>
236 TType const* AsNullable() const { return IsA<TType>() ? static_cast<TType const*>(this) : nullptr; }
237
242 virtual const CTypeBase* GetReferenceValueType() const { return this; }
243
247 virtual const CTypeBase* GetInnerType() const { return this; }
248
250 virtual const CNominalType* AsNominalType() const { return nullptr; }
251
254
256 virtual bool IsPersistable() const = 0;
257
258 virtual bool IsExplicitlyCastable() const = 0;
259
260 virtual bool IsExplicitlyConcrete() const = 0;
261
265 UE_API SmallDefinitionArray FindInstanceMember(const CSymbol& MemberName, EMemberOrigin Origin, const SQualifier& Qualifier, const CAstPackage* ContextPackage = nullptr) const;
266 virtual SmallDefinitionArray FindInstanceMember(const CSymbol& MemberName, EMemberOrigin Origin, const SQualifier& Qualifier, const CAstPackage* ContextPackage, VisitStampType VisitStamp) const { return {}; }
267 UE_API SmallDefinitionArray FindTypeMember(const CSymbol& MemberName, EMemberOrigin Origin, const SQualifier& Qualifier) const;
268 virtual SmallDefinitionArray FindTypeMember(const CSymbol& MemberName, EMemberOrigin Origin, const SQualifier& Qualifier, VisitStampType VisitStamp) const { return {}; }
269
270 // CTypeBase interface.
271 virtual const CNormalType& GetNormalType() const override { return *this; }
272
273private:
274 const ETypeKind _Kind;
275};
276
277// Global type: used for various kinds of types of which there are one per program: false, unit, void, any.
278template<ETypeKind Kind>
280{
281public:
282 static const ETypeKind StaticTypeKind = Kind;
283
284 // CTypeBase interface.
286 {
287 if (Kind == ETypeKind::False) { return "false"; }
288 else if (Kind == ETypeKind::True) { return "true"; }
289 else if (Kind == ETypeKind::Void) { return "void"; }
290 else if (Kind == ETypeKind::Any) { return "any"; }
291 else if (Kind == ETypeKind::Comparable) { return "comparable"; }
292 else if (Kind == ETypeKind::Logic) { return "logic"; }
293 else if (Kind == ETypeKind::Rational) { return "rational"; }
294 else if (Kind == ETypeKind::Char8) { return "char"; }
295 else if (Kind == ETypeKind::Char32) { return "char32"; }
296 else if (Kind == ETypeKind::Path) { return "path"; }
297 else if (Kind == ETypeKind::Range) { return "$range"; }
298 else if (Kind == ETypeKind::Persistable) { return "persistable"; }
299 else { ULANG_UNREACHABLE(); }
300 }
301
302 // CNormalType interface.
303 virtual EComparability GetComparability() const override
304 {
305 if (Kind == ETypeKind::Comparable
306 || Kind == ETypeKind::Logic
307 || Kind == ETypeKind::Rational
308 || Kind == ETypeKind::Char8
309 || Kind == ETypeKind::Char32
310 || Kind == ETypeKind::False)
311 {
313 }
314 else if (Kind == ETypeKind::True || Kind == ETypeKind::Void)
315 {
317 }
318 else
319 {
321 }
322 }
323
324 virtual bool IsPersistable() const override
325 {
326 return Kind == Cases<
327 ETypeKind::Void,
328 ETypeKind::Logic,
329 ETypeKind::Char8,
330 ETypeKind::Char32,
331 ETypeKind::Persistable>;
332 }
333
334 virtual bool IsExplicitlyCastable() const override
335 {
336 return Kind == ETypeKind::False;
337 }
338
339 virtual bool IsExplicitlyConcrete() const override
340 {
341 return Kind == ETypeKind::False;
342 }
343
344 virtual bool CanBeCustomAccessorDataType() const override
345 {
346 return Kind == Cases<
347 ETypeKind::Logic,
348 ETypeKind::Rational,
349 ETypeKind::Char8,
350 ETypeKind::Char32
351 >;
352 }
353
354 virtual bool CanBePredictsVarDataType() const override
355 {
356 return Kind == Cases<
357 ETypeKind::Logic
358 >;
359 }
360
361private:
363
364 friend class CSemanticProgram;
365};
366
379
380class CTypeType : public CNormalType
381{
382public:
383 static const ETypeKind StaticTypeKind = ETypeKind::Type;
384
387 , _NegativeType(NegativeType)
388 , _PositiveType(PositiveType)
389 {
390 }
391
393
395 const CSymbol& MemberName,
396 EMemberOrigin Origin,
397 const SQualifier& Qualifier,
399 VisitStampType VisitStamp) const override
400 {
401 return PositiveType()->GetNormalType().FindTypeMember(MemberName, Origin, Qualifier, VisitStamp);
402 }
403
404 const CTypeBase* NegativeType() const { return _NegativeType; }
405
406 const CTypeBase* PositiveType() const { return _PositiveType; }
407
408 bool IsPersistable() const override { return false; }
409
410 bool IsExplicitlyCastable() const override { return false; }
411
412 bool IsCastableSubtype() const { return _PositiveType->GetNormalType().IsExplicitlyCastable(); }
413
414 bool IsExplicitlyConcrete() const override { return false; }
415
416 bool IsConcreteSubtype() const { return _PositiveType->GetNormalType().IsExplicitlyConcrete(); }
417
418 struct Key
419 {
422
423 friend bool operator==(const Key& Left, const Key& Right)
424 {
425 return
426 Left.NegativeType == Right.NegativeType &&
427 Left.PositiveType == Right.PositiveType;
428 }
429
430 friend bool operator!=(const Key& Left, const Key& Right)
431 {
432 return
433 Left.NegativeType != Right.NegativeType ||
434 Left.PositiveType != Right.PositiveType;
435 }
436
437 friend bool operator<(const Key& Left, const Key& Right)
438 {
439 if (Left.NegativeType == Right.NegativeType)
440 {
441 return Left.PositiveType < Right.PositiveType;
442 }
443 return Left.NegativeType < Right.NegativeType;
444 }
445 };
446
447 operator Key() const
448 {
449 return {_NegativeType, _PositiveType};
450 }
451
452 virtual bool CanBeCustomAccessorDataType() const override { return false; }
453
454private:
455 const CTypeBase* _NegativeType;
456 const CTypeBase* _PositiveType;
457};
458
460{
461public:
462 static const ETypeKind StaticTypeKind = ETypeKind::Castable;
463
468
469 virtual const CTypeBase* GetInnerType() const override
470 {
472 }
473
474 const CTypeBase& SuperType() const
475 {
476 return *_SuperType;
477 }
478
479 // Needed for map insertion
480 struct Key
481 {
483
484 friend bool operator==(const Key& Left, const Key& Right)
485 {
486 return Left.SuperType == Right.SuperType;
487 }
488
489 friend bool operator!=(const Key& Left, const Key& Right)
490 {
491 return Left.SuperType != Right.SuperType;
492 }
493
494 friend bool operator<(const Key& Left, const Key& Right)
495 {
496 return Left.SuperType < Right.SuperType;
497 }
498 };
499
500 operator Key() const { return {_SuperType}; }
501
510
511 virtual bool IsPersistable() const override { return false; }
512
513 virtual bool IsExplicitlyCastable() const override { return true; }
514
515 virtual bool IsExplicitlyConcrete() const override { return false; }
516
517 virtual bool CanBeCustomAccessorDataType() const override { return false; }
518
519 virtual SmallDefinitionArray FindInstanceMember(const CSymbol& MemberName, EMemberOrigin Origin, const SQualifier& Qualifier, const CAstPackage* ContextPackage, VisitStampType VisitStamp) const override
520 {
521 return _SuperType->GetNormalType().FindInstanceMember(MemberName, Origin, Qualifier, ContextPackage, VisitStamp);
522 }
523 virtual SmallDefinitionArray FindTypeMember(const CSymbol& MemberName, EMemberOrigin Origin, const SQualifier& Qualifier, VisitStampType VisitStamp) const override
524 {
525 return _SuperType->GetNormalType().FindTypeMember(MemberName, Origin, Qualifier, VisitStamp);
526 }
527
528protected:
530};
531
533{
534public:
535 static const ETypeKind StaticTypeKind = ETypeKind::Concrete;
536
541
542 virtual const CTypeBase* GetInnerType() const override
543 {
545 }
546
547 const CTypeBase& SuperType() const
548 {
549 return *_SuperType;
550 }
551
552 // Needed for map insertion
553 struct Key
554 {
556
557 friend bool operator==(const Key& Left, const Key& Right)
558 {
559 return Left.SuperType == Right.SuperType;
560 }
561
562 friend bool operator!=(const Key& Left, const Key& Right)
563 {
564 return Left.SuperType != Right.SuperType;
565 }
566
567 friend bool operator<(const Key& Left, const Key& Right)
568 {
569 return Left.SuperType < Right.SuperType;
570 }
571 };
572
573 operator Key() const { return { _SuperType }; }
574
583
584 virtual bool IsPersistable() const override { return false; }
585
586 virtual bool IsExplicitlyCastable() const override { return false; }
587
588 virtual bool IsExplicitlyConcrete() const override { return true; }
589
590 virtual bool CanBeCustomAccessorDataType() const override { return false; }
591
592 virtual SmallDefinitionArray FindInstanceMember(const CSymbol& MemberName, EMemberOrigin Origin, const SQualifier& Qualifier, const CAstPackage* ContextPackage, VisitStampType VisitStamp) const override
593 {
594 return _SuperType->GetNormalType().FindInstanceMember(MemberName, Origin, Qualifier, ContextPackage, VisitStamp);
595 }
596 virtual SmallDefinitionArray FindTypeMember(const CSymbol& MemberName, EMemberOrigin Origin, const SQualifier& Qualifier, VisitStampType VisitStamp) const override
597 {
598 return _SuperType->GetNormalType().FindTypeMember(MemberName, Origin, Qualifier, VisitStamp);
599 }
600
601protected:
603};
604
605
608{
609public:
611
612 virtual const CDefinition* Definition() const = 0;
613
614 // CTypeBase interface.
616
617 // CNormalType interface.
618 virtual const CNominalType* AsNominalType() const override { return this; }
619};
620
622{
623public:
630
632
634
635 // CNormalType interface.
636 virtual const CTypeBase* GetInnerType() const override { return PositiveValueType()->GetNormalType().GetInnerType(); }
637
638 struct Key
639 {
642
643 friend bool operator==(const Key& Left, const Key& Right)
644 {
645 return
646 Left.NegativeValueType == Right.NegativeValueType &&
647 Left.PositiveValueType == Right.PositiveValueType;
648 }
649
650 friend bool operator!=(const Key& Left, const Key& Right)
651 {
652 return
653 Left.NegativeValueType != Right.NegativeValueType ||
654 Left.PositiveValueType != Right.PositiveValueType;
655 }
656
657 friend bool operator<(const Key& Left, const Key& Right)
658 {
659 if (Left.NegativeValueType < Right.NegativeValueType)
660 {
661 return true;
662 }
663 if (Right.NegativeValueType < Left.NegativeValueType)
664 {
665 return false;
666 }
667 return Left.PositiveValueType < Right.PositiveValueType;
668 }
669 };
670
671 operator Key() const
672 {
674 }
675
676protected:
679};
680
685{
686public:
687 static const ETypeKind StaticTypeKind = ETypeKind::Pointer;
688
690
691 // CTypeBase interface.
698
699 virtual bool IsPersistable() const override { return false; }
700
701 virtual bool IsExplicitlyCastable() const override { return false; }
702
703 virtual bool IsExplicitlyConcrete() const override { return false; }
704
705 virtual bool CanBeCustomAccessorDataType() const override { return false; }
706};
707
712{
713public:
714 static const ETypeKind StaticTypeKind = ETypeKind::Reference;
715
717
718 // CNormalType interface.
719 virtual const CTypeBase* GetReferenceValueType() const override { return PositiveValueType(); }
720
721 // CTypeBase interface.
728
729 virtual bool IsPersistable() const override { return false; }
730
731 virtual bool IsExplicitlyCastable() const override { return false; }
732
733 virtual bool IsExplicitlyConcrete() const override { return false; }
734
735 virtual bool CanBeCustomAccessorDataType() const override { return false; };
736};
737
742{
743public:
744 CValueType(ETypeKind Kind, CSemanticProgram& Program, const CTypeBase* ValueType) : CNormalType(Kind, Program), _ValueType(ValueType) {}
745
746 // CNormalType interface.
747 virtual const CTypeBase* GetInnerType() const override { return _ValueType->GetNormalType().GetInnerType(); }
748
749 // Needed for map insertion
750 operator CTypeBase const* () const { return _ValueType; }
751
752protected:
754};
755
760{
761public:
762 static const ETypeKind StaticTypeKind = ETypeKind::Option;
763
765
766 const CTypeBase* GetValueType() const { return _ValueType; }
767
768 // CTypeBase interface.
773
775 virtual bool CanBePredictsVarDataType() const override { return GetValueType()->GetNormalType().CanBePredictsVarDataType(); }
776
777 // CNormalType interface.
779 virtual bool IsPersistable() const override { return _ValueType->GetNormalType().IsPersistable(); }
780 virtual bool IsExplicitlyCastable() const override { return false; }
781 virtual bool IsExplicitlyConcrete() const override { return false; }
782};
783
787class CArrayType : public CValueType
788{
789public:
790 static const ETypeKind StaticTypeKind = ETypeKind::Array;
791
793 : CValueType(ETypeKind::Array, Program, ElementType)
794 {}
795
796 const CTypeBase* GetElementType() const { return _ValueType; }
797
798 // Returns whether the type is string, i.e. []char8.
799 bool IsStringType() const
800 {
802 }
803
804 // CTypeBase interface.
809 virtual bool CanBeCustomAccessorDataType() const override { return _ValueType->CanBeCustomAccessorDataType(); }
810
811 // CNormalType interface.
812 virtual EComparability GetComparability() const override
813 {
814 if (IsStringType())
815 {
816 // if the element type is char8, this is supported because our current backend
817 // uses FVerseStringProperty for that instead of FArrayProperty
819 }
821 {
822 // FArrayProperty doesn't support hashing. See SOL-2126.
824 }
825 else
826 {
828 }
829 }
830
831 virtual bool IsPersistable() const override
832 {
834 }
835
836 virtual bool IsExplicitlyCastable() const override
837 {
838 return false;
839 }
840
841 virtual bool IsExplicitlyConcrete() const override
842 {
843 return false;
844 }
845};
846
851{
852public:
853 static const ETypeKind StaticTypeKind = ETypeKind::Generator;
854
856 : CValueType(ETypeKind::Generator, Program, ElementType)
857 {}
858
859 const CTypeBase* GetElementType() const { return _ValueType; }
860
861 // CTypeBase interface.
866
867 virtual bool IsPersistable() const override { return false; }
868
869 virtual bool IsExplicitlyCastable() const override { return false; }
870
871 virtual bool IsExplicitlyConcrete() const override { return false; }
872
873 virtual bool CanBeCustomAccessorDataType() const override { return false; }
874};
875
879class CMapType : public CNormalType
880{
881public:
882 static const ETypeKind StaticTypeKind = ETypeKind::Map;
883
884 CMapType(CSemanticProgram& Program, const CTypeBase& KeyType, const CTypeBase& ValueType, bool bWeak)
886 , _KeyType(&KeyType)
887 , _ValueType(&ValueType)
888 , _bWeak(bWeak)
889 {
890 }
891
892 const CTypeBase* GetKeyType() const
893 {
894 return _KeyType;
895 }
896
897 const CTypeBase* GetValueType() const
898 {
899 return _ValueType;
900 }
901
902 bool IsWeak() const
903 {
904 return _bWeak;
905 }
906
907 virtual EComparability GetComparability() const override
908 {
909 if (!_bWeak &&
912 {
913 // FMapProperty doesn't support hashing. See SOL-2126
915 }
916 else
917 {
919 }
920 }
921
922 virtual bool IsPersistable() const override
923 {
924 return
925 !_bWeak &&
928 }
929
930 virtual bool IsExplicitlyCastable() const override
931 {
932 return false;
933 }
934
935 virtual bool IsExplicitlyConcrete() const override
936 {
937 return false;
938 }
939
940 // CTypeBase interface.
955
956 virtual bool CanBeCustomAccessorDataType() const override { return _ValueType->CanBeCustomAccessorDataType(); }
957
958 struct SKey
959 {
962 bool _bWeak;
963
964 friend bool operator==(const SKey& Left, const SKey& Right)
965 {
966 return Left._KeyType == Right._KeyType && Left._ValueType == Right._ValueType && Left._bWeak == Right._bWeak;
967 }
968
969 friend bool operator!=(const SKey& Left, const SKey& Right)
970 {
971 return !(Left == Right);
972 }
973
974 friend bool operator<(const SKey& Left, const SKey& Right)
975 {
976 if (Left._KeyType < Right._KeyType)
977 {
978 return true;
979 }
980 if (Right._KeyType < Left._KeyType)
981 {
982 return false;
983 }
984 if (Left._ValueType < Right._ValueType)
985 {
986 return true;
987 }
988 if (Right._ValueType < Left._ValueType)
989 {
990 return false;
991 }
992 return Left._bWeak < Right._bWeak;
993 }
994 };
995
996 operator SKey() const
997 {
998 return SKey{_KeyType, _ValueType, _bWeak};
999 }
1000
1001private:
1002 const CTypeBase* _KeyType;
1003 const CTypeBase* _ValueType;
1004 bool _bWeak;
1005};
1006
1008{
1009public:
1010 static const ETypeKind StaticTypeKind = ETypeKind::Tuple;
1011
1013
1015 : CNormalType(ETypeKind::Tuple, Program)
1016 , _Elements(Move(Elements))
1017 , _FirstNamedIndex(FirstNamedIndex)
1018 , _LastVisitStamp(0u)
1019 {}
1020
1021 ULANG_FORCEINLINE bool TryMarkVisited(VisitStampType VisitStamp) const { if (_LastVisitStamp == VisitStamp) { return false; } else { _LastVisitStamp = VisitStamp; return true; } }
1022
1023 ULANG_FORCEINLINE int32_t Num() const { return _Elements.Num(); }
1024 const CTypeBase* operator[](int32_t Index) const { return _Elements[Index]; }
1025 const ElementArray& GetElements() const { return _Elements; }
1027
1029
1030 int32_t GetFirstNamedIndex() const { return _FirstNamedIndex; }
1032
1033 // CTypeBase interface.
1037 virtual bool CanBeCustomAccessorDataType() const override { return false; }
1038
1039 // CNormalType interface.
1040 UE_API virtual EComparability GetComparability() const override;
1041 UE_API virtual bool IsPersistable() const override;
1042 virtual bool IsExplicitlyCastable() const override { return false; }
1043 virtual bool IsExplicitlyConcrete() const override { return false; }
1044
1045private:
1046 ElementArray _Elements;
1047
1048 int32_t _FirstNamedIndex;
1049
1050 // Used to detect reentrant visits to a tuple.
1051 mutable VisitStampType _LastVisitStamp;
1052};
1053
1055{
1056public:
1057 static const ETypeKind StaticTypeKind = ETypeKind::Function;
1058
1060
1063 const CTypeBase& ParamsType,
1064 const CTypeBase& ReturnType,
1065 const SEffectSet Effects,
1067 bool ImplicitlySpecialized = false)
1069 , _ParamsType(&ParamsType)
1070 , _ReturnType(ReturnType)
1071 , _Effects(Effects)
1072 , _TypeVariables(Move(TypeVariables))
1073 , _bImplicitlySpecialized(ImplicitlySpecialized)
1074 {}
1075
1076 const CTypeBase& GetParamsType() const { return *_ParamsType; }
1077 const CTypeBase& GetReturnType() const { return _ReturnType; }
1078 SEffectSet GetEffects() const { return _Effects; }
1079 bool ImplicitlySpecialized() const { return _bImplicitlySpecialized; }
1080 const TArray<const CTypeVariable*>& GetTypeVariables() const { return _TypeVariables; }
1081
1083
1085
1086 static ParamTypes AsParamTypes(CTypeBase const* const& Type)
1087 {
1088 if (const CTupleType* TupleType = Type->GetNormalType().AsNullable<CTupleType>())
1089 {
1090 return ParamTypes(TupleType->GetElements());
1091 }
1092 return SingletonRangeView(Type);
1093 }
1094
1096 {
1097 return AsParamTypes(_ParamsType);
1098 }
1099
1106
1109
1110 // CTypeBase interface.
1112
1113 virtual bool IsPersistable() const override { return false; }
1114
1115 virtual bool IsExplicitlyCastable() const override { return false; }
1116
1117 virtual bool IsExplicitlyConcrete() const override { return false; }
1118
1119 virtual bool CanBeCustomAccessorDataType() const override { return false; }
1120
1121 UE_API bool CanBeCalledFromPredicts() const;
1122
1123private:
1124 const CTypeBase* _ParamsType;
1125 const CTypeBase& _ReturnType;
1126 SEffectSet _Effects;
1127 TArray<const CTypeVariable*> _TypeVariables;
1128 bool _bImplicitlySpecialized;
1129};
1130
1131enum class ETypePolarity : char { Negative, Positive };
1132
1134{
1135 switch (Polarity)
1136 {
1139 default: ULANG_UNREACHABLE();
1140 }
1141}
1142
1143class CFlowType : public CTypeBase
1144{
1145public:
1148 , _Polarity(Polarity)
1149 , _Child(Child)
1150 {
1151 }
1152
1154
1155 UE_API const CTypeBase* GetChild() const;
1156
1157 UE_API void SetChild(const CTypeBase*) const;
1158
1160 {
1161 return _FlowEdges;
1162 }
1163
1164 UE_API void AddFlowEdge(const CFlowType*) const;
1165
1166 UE_API void EmptyFlowEdges() const;
1167
1168 UE_API virtual const CNormalType& GetNormalType() const override;
1169
1170 virtual CFlowType* AsFlowType() override { return this; }
1171
1172 virtual const CFlowType* AsFlowType() const override { return this; }
1173
1175
1176 virtual bool CanBeCustomAccessorDataType() const override { return false; }
1177
1178private:
1179 ETypePolarity _Polarity;
1180 mutable const CTypeBase* _Child;
1181 mutable TSet<const CFlowType*> _FlowEdges;
1182};
1183
1185{
1189
1190 STypeVariableSubstitution(const CTypeVariable* TypeVariable, const CTypeBase* NegativeType, const CTypeBase* PositiveType)
1191 : _TypeVariable(TypeVariable)
1192 , _NegativeType(NegativeType)
1193 , _PositiveType(PositiveType)
1194 {
1195 }
1196
1198 {
1199 return
1200 Left._TypeVariable == Right._TypeVariable &&
1201 Left._NegativeType == Right._NegativeType &&
1202 Left._PositiveType == Right._PositiveType;
1203 }
1204};
1205
1207{
1210
1211 SInstantiatedTypeVariable(const CTypeBase* NegativeType, const CTypeBase* PositiveType)
1212 : _NegativeType(NegativeType)
1213 , _PositiveType(PositiveType)
1214 {
1215 }
1216
1218 {
1219 return
1220 Left._NegativeType == Right._NegativeType &&
1221 Left._PositiveType == Right._PositiveType;
1222 }
1223};
1224
1228{
1229 virtual const CNormalType& GetNormalType() const override
1230 {
1231 if (!_NormalType)
1232 {
1233 _NormalType = &CreateNormalType();
1234 }
1235 return *_NormalType;
1236 }
1237
1238 // CTypeBase interface.
1240 {
1241 return GetNormalType().AsCodeRecursive(OuterPrecedence, VisitedFlowTypes, bLinkable, Flag);
1242 }
1243
1244protected:
1247 , _Polarity(Polarity)
1248 , _Substitutions(Move(Arguments))
1249 {
1250 }
1251
1252 virtual ~CInstantiatedType() = default;
1253
1254 virtual const CNormalType& CreateNormalType() const = 0;
1255
1256 ETypePolarity GetPolarity() const { return _Polarity; }
1257
1258 const TArray<STypeVariableSubstitution>& GetSubstitutions() const { return _Substitutions; }
1259
1260private:
1261 ETypePolarity _Polarity;
1262
1263 TArray<STypeVariableSubstitution> _Substitutions;
1264
1265 mutable const CNormalType* _NormalType = nullptr;
1266};
1267
1269{
1270public:
1271 static constexpr ETypeKind StaticTypeKind = ETypeKind::Named;
1272
1274 : CValueType(ETypeKind::Named, Program, ValueType)
1275 , _Name(Name)
1276 , _HasValue(HasDefault)
1277 {
1278 }
1279
1280 CSymbol GetName() const { return _Name; }
1281
1282 const CTypeBase* GetValueType() const { return _ValueType; }
1283
1284 bool HasValue() const { return _HasValue; }
1285
1287
1288 UE_API const CTupleType& ToTupleType() const;
1289
1290 virtual CNamedType* AsNamedType() override { return this; }
1291
1292 virtual const CNamedType* AsNamedType() const override { return this; }
1293
1294 struct Key
1295 {
1299
1300 friend bool operator==(const Key& Left, const Key& Right)
1301 {
1302 return
1303 Left.Name == Right.Name &&
1304 Left.ValueType == Right.ValueType &&
1305 Left.HasValue == Right.HasValue;
1306 }
1307
1308 friend bool operator!=(const Key& Left, const Key& Right)
1309 {
1310 return
1311 Left.Name != Right.Name ||
1312 Left.ValueType != Right.ValueType ||
1313 Left.HasValue != Right.HasValue;
1314 }
1315
1316 friend bool operator<(const Key& Left, const Key& Right)
1317 {
1318 if (Left.Name < Right.Name)
1319 {
1320 return true;
1321 }
1322 if (Right.Name < Left.Name)
1323 {
1324 return false;
1325 }
1326 if (Left.ValueType < Right.ValueType)
1327 {
1328 return true;
1329 }
1330 if (Right.ValueType < Left.ValueType)
1331 {
1332 return false;
1333 }
1334 return Left.HasValue < Right.HasValue;
1335 }
1336 };
1337
1338 operator Key() const
1339 {
1340 return {_Name, _ValueType, _HasValue};
1341 }
1342
1343 virtual bool IsPersistable() const override { return false; }
1344
1345 virtual bool IsExplicitlyCastable() const override { return false; }
1346
1347 virtual bool IsExplicitlyConcrete() const override { return false; }
1348
1349 virtual bool CanBeCustomAccessorDataType() const override { return false; }
1350
1351private:
1352 CSymbol _Name;
1353 bool _HasValue;
1354};
1355
1356class CIntType : public CNormalType
1357{
1358public:
1359 static constexpr ETypeKind StaticTypeKind = ETypeKind::Int;
1360
1363 , _MinInclusive(Min)
1364 , _MaxInclusive(Max)
1365 {
1366 }
1367
1368 const FIntOrNegativeInfinity& GetMin() const { return _MinInclusive; }
1369 const FIntOrPositiveInfinity& GetMax() const { return _MaxInclusive; }
1370
1371 bool IsInhabitable() const { return GetMin() <= GetMax(); }
1372
1374
1376
1377 virtual bool IsPersistable() const override { return true; }
1378 virtual bool IsExplicitlyCastable() const override { return false; }
1379 virtual bool IsExplicitlyConcrete() const override { return false; }
1380
1381 virtual bool CanBeCustomAccessorDataType() const override { return true; }
1382 virtual bool CanBePredictsVarDataType() const override { return true; }
1383
1384private:
1385 FIntOrNegativeInfinity _MinInclusive;
1386 FIntOrPositiveInfinity _MaxInclusive;
1387};
1388
1389// the float type is a special form of CFloatType where _MaxInclusive is NaN. The only other way NaN can be encoded is for the NaN literal intrinsic.
1390// Given these constraints on NaN, we simpify our implementation by turning all doubles into a total order via CMath::FloatRanking.
1392{
1393public:
1394 static constexpr ETypeKind StaticTypeKind = ETypeKind::Float;
1395
1398 , _MinInclusive(Min)
1399 , _MaxInclusive(Max)
1400 , _MinRanking(MinRanking)
1401 , _MaxRanking(MaxRanking)
1402 {
1403 }
1404
1405 double GetMin() const { return _MinInclusive; }
1406 double GetMax() const { return _MaxInclusive; }
1407 int64_t MinRanking() const { return _MinRanking; }
1408 int64_t MaxRanking() const { return _MaxRanking; }
1409
1410 bool IsInhabitable() const { return _MinRanking <= _MaxRanking; }
1411 bool IsIntrinsicFloatType() const { return std::isnan(GetMax()) && GetMin() == -INFINITY; }
1412
1413 // The only reason we preserve the "original" doubles is for AsCode.
1415
1417 virtual bool IsPersistable() const override { return true; }
1418 virtual bool IsExplicitlyCastable() const override { return false; }
1419 virtual bool IsExplicitlyConcrete() const override { return false; }
1420
1421 virtual bool CanBeCustomAccessorDataType() const override { return true; }
1422 virtual bool CanBePredictsVarDataType() const override { return true; }
1423
1424private:
1425 double _MinInclusive;
1426 double _MaxInclusive;
1427 int64_t _MinRanking;
1428 int64_t _MaxRanking;
1429};
1430
1432{
1435
1437 {
1438 if (Left.TypeVariable < Right.TypeVariable)
1439 {
1440 return true;
1441 }
1442 if (Right.TypeVariable < Left.TypeVariable)
1443 {
1444 return false;
1445 }
1446 return Left.Polarity < Right.Polarity;
1447 }
1448};
1449
1451
1453{
1456
1458 {
1459 return Left.NormalType == Right.NormalType && Left.Polarity == Right.Polarity;
1460 }
1461};
1462
1466namespace SemanticTypeUtils
1467{
1468 VERSECOMPILER_API const CClass* AsSingleClass(const CNormalType& NegativeType, const CNormalType& PositiveType);
1469
1470 VERSECOMPILER_API const CInterface* AsSingleInterface(const CNormalType& NegativeType, const CNormalType& PositiveType);
1471
1473
1475
1477
1482
1484
1486
1490
1493
1496
1499
1502
1504
1506
1508
1511
1514
1517
1518 VERSECOMPILER_API bool IsUnknownType(const CTypeBase* Type);
1519
1521
1522 VERSECOMPILER_API void VisitAllDefinitions(const CTypeBase* Type, const CAstPackage* VisitorPackage, const TFunction<void(const CDefinition&,const CSymbol&)>& Functor);
1523
1527 VERSECOMPILER_API void ForEachDataType(const CTypeBase*, const TFunction<void(const CTypeBase*)>&);
1528
1531 VERSECOMPILER_API void ForEachDataTypeRecursive(const CTypeBase*, const TFunction<void(const CTypeBase*)>&);
1532
1533 // Returns whether the type is string, i.e. []char8.
1534 inline bool IsStringType(const CNormalType& NormalType)
1535 {
1536 return NormalType.IsA<CArrayType>()
1537 && NormalType.AsChecked<CArrayType>().IsStringType();
1538 }
1539
1540 // Returns whether the type is a localizable message type
1541 bool IsMessageType(const CNormalType& NormalType);
1542
1543 // Returns whether the type is agent
1544 bool IsAgentTypeExclusive(const CTypeBase* Type);
1545
1546 // Returns whether the type is a leaderboard type
1547 bool IsLeaderboardType(const CNormalType& NormalType);
1548
1549 // Returns whether a type can be used with @editable.
1550 // An enum is used instead of a bool to make it possible to produce a more informative error message.
1551 enum class EIsEditable
1552 {
1553 Yes,
1557 // @HACK: corresponds to hack in SemanticTypeUtils::IsEditableClassType
1559 };
1563
1564 VERSECOMPILER_API const CTypeBase* RemovePointer(const CTypeBase* Type /* can be null */, ETypePolarity Polarity);
1565 VERSECOMPILER_API const CTypeBase* RemoveReference(const CTypeBase* Type /* can be null */, ETypePolarity Polarity);
1569
1572
1574 const CTypeBase*,
1578 const CTypeBase*,
1582}
1583} // namespace uLang
1584
1585#undef UE_API
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define ULANG_ENUM_BIT_FLAGS(Enum,...)
Definition EnumUtils.h:6
#define UE_API
Definition SColorGradingComponentViewer.h:12
#define VERSE_ENUM_SEMANTIC_TYPE_KINDS(v)
Definition SemanticTypes.h:56
#define ULANG_FORCEINLINE
Definition Common.h:188
#define ULANG_UNREACHABLE()
Definition Common.h:243
#define ULANG_ASSERTF(expr, format,...)
Definition Common.h:290
Definition TypeAlias.h:19
Definition SemanticTypes.h:788
virtual bool IsPersistable() const override
Definition SemanticTypes.h:831
bool IsStringType() const
Definition SemanticTypes.h:799
const CTypeBase * GetElementType() const
Definition SemanticTypes.h:796
virtual bool IsExplicitlyConcrete() const override
Definition SemanticTypes.h:841
virtual CUTF8String AsCodeRecursive(ETypeSyntaxPrecedence OuterPrecedence, TArray< const CFlowType * > &VisitedFlowTypes, bool bLinkable, ETypeStringFlag Flag) const override
Definition SemanticTypes.h:805
virtual bool IsExplicitlyCastable() const override
Definition SemanticTypes.h:836
virtual EComparability GetComparability() const override
Definition SemanticTypes.h:812
virtual bool CanBeCustomAccessorDataType() const override
Definition SemanticTypes.h:809
CArrayType(CSemanticProgram &Program, const CTypeBase *ElementType)
Definition SemanticTypes.h:792
static const ETypeKind StaticTypeKind
Definition SemanticTypes.h:790
Definition Expression.h:3494
Definition SemanticTypes.h:460
CCastableType(CSemanticProgram &Program, const CTypeBase &SuperType)
Definition SemanticTypes.h:464
static const ETypeKind StaticTypeKind
Definition SemanticTypes.h:462
virtual SmallDefinitionArray FindTypeMember(const CSymbol &MemberName, EMemberOrigin Origin, const SQualifier &Qualifier, VisitStampType VisitStamp) const override
Definition SemanticTypes.h:523
virtual bool IsExplicitlyConcrete() const override
Definition SemanticTypes.h:515
virtual SmallDefinitionArray FindInstanceMember(const CSymbol &MemberName, EMemberOrigin Origin, const SQualifier &Qualifier, const CAstPackage *ContextPackage, VisitStampType VisitStamp) const override
Definition SemanticTypes.h:519
virtual bool IsExplicitlyCastable() const override
Definition SemanticTypes.h:513
const CTypeBase & SuperType() const
Definition SemanticTypes.h:474
const CTypeBase * _SuperType
Definition SemanticTypes.h:529
virtual bool CanBeCustomAccessorDataType() const override
Definition SemanticTypes.h:517
virtual bool IsPersistable() const override
Definition SemanticTypes.h:511
virtual CUTF8String AsCodeRecursive(ETypeSyntaxPrecedence OuterPrecedence, TArray< const CFlowType * > &VisitedFlowTypes, bool bLinkable, ETypeStringFlag Flag) const
Definition SemanticTypes.h:502
virtual const CTypeBase * GetInnerType() const override
Definition SemanticTypes.h:469
Definition SemanticClass.h:207
Definition SemanticClass.h:33
Definition SemanticTypes.h:533
CConcreteType(CSemanticProgram &Program, const CTypeBase &SuperType)
Definition SemanticTypes.h:537
const CTypeBase * _SuperType
Definition SemanticTypes.h:602
virtual bool IsExplicitlyCastable() const override
Definition SemanticTypes.h:586
virtual bool IsExplicitlyConcrete() const override
Definition SemanticTypes.h:588
virtual SmallDefinitionArray FindTypeMember(const CSymbol &MemberName, EMemberOrigin Origin, const SQualifier &Qualifier, VisitStampType VisitStamp) const override
Definition SemanticTypes.h:596
const CTypeBase & SuperType() const
Definition SemanticTypes.h:547
virtual const CTypeBase * GetInnerType() const override
Definition SemanticTypes.h:542
virtual bool IsPersistable() const override
Definition SemanticTypes.h:584
virtual CUTF8String AsCodeRecursive(ETypeSyntaxPrecedence OuterPrecedence, TArray< const CFlowType * > &VisitedFlowTypes, bool bLinkable, ETypeStringFlag Flag) const
Definition SemanticTypes.h:575
virtual SmallDefinitionArray FindInstanceMember(const CSymbol &MemberName, EMemberOrigin Origin, const SQualifier &Qualifier, const CAstPackage *ContextPackage, VisitStampType VisitStamp) const override
Definition SemanticTypes.h:592
virtual bool CanBeCustomAccessorDataType() const override
Definition SemanticTypes.h:590
static const ETypeKind StaticTypeKind
Definition SemanticTypes.h:535
Definition DataDefinition.h:41
Definition Definition.h:131
Definition SemanticTypes.h:1392
virtual bool CanBeCustomAccessorDataType() const override
Definition SemanticTypes.h:1421
int64_t MaxRanking() const
Definition SemanticTypes.h:1408
virtual EComparability GetComparability() const override
Definition SemanticTypes.h:1416
double GetMin() const
Definition SemanticTypes.h:1405
virtual bool CanBePredictsVarDataType() const override
Definition SemanticTypes.h:1422
int64_t MinRanking() const
Definition SemanticTypes.h:1407
CFloatType(CSemanticProgram &Program, double Min, double Max, int64_t MinRanking, int64_t MaxRanking)
Definition SemanticTypes.h:1396
virtual UE_API CUTF8String AsCodeRecursive(ETypeSyntaxPrecedence OuterPrecedence, TArray< const CFlowType * > &VisitedFlowTypes, bool bLinkable, ETypeStringFlag Flag) const override
Definition SemanticTypes.cpp:411
bool IsInhabitable() const
Definition SemanticTypes.h:1410
bool IsIntrinsicFloatType() const
Definition SemanticTypes.h:1411
virtual bool IsPersistable() const override
Definition SemanticTypes.h:1417
double GetMax() const
Definition SemanticTypes.h:1406
virtual bool IsExplicitlyCastable() const override
Definition SemanticTypes.h:1418
virtual bool IsExplicitlyConcrete() const override
Definition SemanticTypes.h:1419
static constexpr ETypeKind StaticTypeKind
Definition SemanticTypes.h:1394
Definition SemanticTypes.h:1144
UE_API void EmptyFlowEdges() const
Definition SemanticTypes.cpp:495
virtual CFlowType * AsFlowType() override
Definition SemanticTypes.h:1170
CFlowType(CSemanticProgram &Program, ETypePolarity Polarity, const CTypeBase *Child)
Definition SemanticTypes.h:1146
virtual UE_API const CNormalType & GetNormalType() const override
Definition SemanticTypes.cpp:575
TSet< const CFlowType * > & FlowEdges() const
Definition SemanticTypes.h:1159
virtual UE_API CUTF8String AsCodeRecursive(ETypeSyntaxPrecedence OuterPrecedence, TArray< const CFlowType * > &VisitedFlowTypes, bool bLinkable, ETypeStringFlag Flag) const override
Definition SemanticTypes.cpp:580
UE_API void AddFlowEdge(const CFlowType *) const
Definition SemanticTypes.cpp:486
UE_API const CTypeBase * GetChild() const
Definition SemanticTypes.cpp:475
virtual bool CanBeCustomAccessorDataType() const override
Definition SemanticTypes.h:1176
virtual const CFlowType * AsFlowType() const override
Definition SemanticTypes.h:1172
UE_API void SetChild(const CTypeBase *) const
Definition SemanticTypes.cpp:480
UE_API ETypePolarity Polarity() const
Definition SemanticTypes.cpp:470
Definition SemanticTypes.h:1055
virtual bool CanBeCustomAccessorDataType() const override
Definition SemanticTypes.h:1119
const CTypeBase & GetReturnType() const
Definition SemanticTypes.h:1077
virtual bool IsExplicitlyConcrete() const override
Definition SemanticTypes.h:1117
void BuildTypeVariableCode(CUTF8StringBuilder &Builder, ETypeStringFlag Flag=ETypeStringFlag::Simple) const
Definition SemanticTypes.h:1101
const CTypeBase & GetParamsType() const
Definition SemanticTypes.h:1076
virtual bool IsExplicitlyCastable() const override
Definition SemanticTypes.h:1115
UE_API void BuildEffectAttributeCode(CUTF8StringBuilder &Builder) const
Definition SemanticTypes.cpp:296
SEffectSet GetEffects() const
Definition SemanticTypes.h:1078
static ParamTypes AsParamTypes(CTypeBase const *const &Type)
Definition SemanticTypes.h:1086
UE_API void BuildParameterBlockCode(CUTF8StringBuilder &Builder, TArray< const CFlowType * > &VisitedFlowTypes, bool bLinkable, ETypeStringFlag Flag) const
Definition SemanticTypes.cpp:309
virtual bool IsPersistable() const override
Definition SemanticTypes.h:1113
bool ImplicitlySpecialized() const
Definition SemanticTypes.h:1079
UE_API void BuildTypeVariableCode(CUTF8StringBuilder &Builder, TArray< const CFlowType * > &VisitedFlowTypes, bool bLinkable, ETypeStringFlag Flag) const
Definition SemanticTypes.cpp:281
static const ETypeKind StaticTypeKind
Definition SemanticTypes.h:1057
const TArray< const CTypeVariable * > & GetTypeVariables() const
Definition SemanticTypes.h:1080
virtual UE_API CUTF8String AsCodeRecursive(ETypeSyntaxPrecedence OuterPrecedence, TArray< const CFlowType * > &VisitedFlowTypes, bool bLinkable, ETypeStringFlag Flag) const override
Definition SemanticTypes.cpp:329
CFunctionType(CSemanticProgram &Program, const CTypeBase &ParamsType, const CTypeBase &ReturnType, const SEffectSet Effects, TArray< const CTypeVariable * > &&TypeVariables={}, bool ImplicitlySpecialized=false)
Definition SemanticTypes.h:1061
UE_API bool CanBeCalledFromPredicts() const
Definition SemanticTypes.cpp:359
ParamTypes GetParamTypes() const
Definition SemanticTypes.h:1095
TRangeView< CTypeBase const *const *, CTypeBase const *const * > ParamTypes
Definition SemanticTypes.h:1059
static UE_API const CTypeBase * GetOrCreateParamType(CSemanticProgram &, CTupleType::ElementArray &&ParamTypes)
Definition SemanticTypes.cpp:271
Definition SemanticTypes.h:851
static const ETypeKind StaticTypeKind
Definition SemanticTypes.h:853
virtual bool IsExplicitlyConcrete() const override
Definition SemanticTypes.h:871
virtual bool IsPersistable() const override
Definition SemanticTypes.h:867
CGeneratorType(CSemanticProgram &Program, const CTypeBase *ElementType)
Definition SemanticTypes.h:855
virtual bool IsExplicitlyCastable() const override
Definition SemanticTypes.h:869
virtual CUTF8String AsCodeRecursive(ETypeSyntaxPrecedence OuterPrecedence, TArray< const CFlowType * > &VisitedFlowTypes, bool bLinkable, ETypeStringFlag Flag) const override
Definition SemanticTypes.h:862
virtual bool CanBeCustomAccessorDataType() const override
Definition SemanticTypes.h:873
const CTypeBase * GetElementType() const
Definition SemanticTypes.h:859
Definition SemanticTypes.h:280
virtual bool IsExplicitlyCastable() const override
Definition SemanticTypes.h:334
virtual CUTF8String AsCodeRecursive(ETypeSyntaxPrecedence OuterPrecedence, TArray< const CFlowType * > &VisitedFlowTypes, bool bLinkable, ETypeStringFlag Flag) const override
Definition SemanticTypes.h:285
virtual EComparability GetComparability() const override
Definition SemanticTypes.h:303
virtual bool CanBeCustomAccessorDataType() const override
Definition SemanticTypes.h:344
static const ETypeKind StaticTypeKind
Definition SemanticTypes.h:282
virtual bool CanBePredictsVarDataType() const override
Definition SemanticTypes.h:354
virtual bool IsPersistable() const override
Definition SemanticTypes.h:324
virtual bool IsExplicitlyConcrete() const override
Definition SemanticTypes.h:339
Definition SemanticTypes.h:1228
virtual ~CInstantiatedType()=default
virtual const CNormalType & CreateNormalType() const =0
const TArray< STypeVariableSubstitution > & GetSubstitutions() const
Definition SemanticTypes.h:1258
ETypePolarity GetPolarity() const
Definition SemanticTypes.h:1256
CInstantiatedType(CSemanticProgram &Program, ETypePolarity Polarity, TArray< STypeVariableSubstitution > Arguments)
Definition SemanticTypes.h:1245
Definition SemanticTypes.h:1357
virtual EComparability GetComparability() const override
Definition SemanticTypes.h:1375
virtual bool CanBeCustomAccessorDataType() const override
Definition SemanticTypes.h:1381
virtual bool IsPersistable() const override
Definition SemanticTypes.h:1377
virtual bool IsExplicitlyCastable() const override
Definition SemanticTypes.h:1378
const FIntOrNegativeInfinity & GetMin() const
Definition SemanticTypes.h:1368
static constexpr ETypeKind StaticTypeKind
Definition SemanticTypes.h:1359
virtual UE_API CUTF8String AsCodeRecursive(ETypeSyntaxPrecedence OuterPrecedence, TArray< const CFlowType * > &VisitedFlowTypes, bool bLinkable, ETypeStringFlag Flag) const override
Definition SemanticTypes.cpp:369
virtual bool CanBePredictsVarDataType() const override
Definition SemanticTypes.h:1382
CIntType(CSemanticProgram &Program, const FIntOrNegativeInfinity &Min, const FIntOrPositiveInfinity &Max)
Definition SemanticTypes.h:1361
bool IsInhabitable() const
Definition SemanticTypes.h:1371
virtual bool IsExplicitlyConcrete() const override
Definition SemanticTypes.h:1379
const FIntOrPositiveInfinity & GetMax() const
Definition SemanticTypes.h:1369
Definition SemanticInterface.h:25
Definition SemanticTypes.h:622
const CTypeBase * _PositiveValueType
Definition SemanticTypes.h:678
const CTypeBase * NegativeValueType() const
Definition SemanticTypes.h:631
virtual const CTypeBase * GetInnerType() const override
Definition SemanticTypes.h:636
const CTypeBase * PositiveValueType() const
Definition SemanticTypes.h:633
CInvariantValueType(ETypeKind Kind, CSemanticProgram &Program, const CTypeBase *NegativeValueType, const CTypeBase *PositiveValueType)
Definition SemanticTypes.h:624
const CTypeBase * _NegativeValueType
Definition SemanticTypes.h:677
Definition SemanticTypes.h:880
virtual CUTF8String AsCodeRecursive(ETypeSyntaxPrecedence OuterPrecedence, TArray< const CFlowType * > &VisitedFlowTypes, bool bLinkable, ETypeStringFlag Flag) const override
Definition SemanticTypes.h:941
virtual bool IsExplicitlyConcrete() const override
Definition SemanticTypes.h:935
CMapType(CSemanticProgram &Program, const CTypeBase &KeyType, const CTypeBase &ValueType, bool bWeak)
Definition SemanticTypes.h:884
virtual EComparability GetComparability() const override
Definition SemanticTypes.h:907
const CTypeBase * GetValueType() const
Definition SemanticTypes.h:897
virtual bool IsPersistable() const override
Definition SemanticTypes.h:922
const CTypeBase * GetKeyType() const
Definition SemanticTypes.h:892
virtual bool CanBeCustomAccessorDataType() const override
Definition SemanticTypes.h:956
virtual bool IsExplicitlyCastable() const override
Definition SemanticTypes.h:930
static const ETypeKind StaticTypeKind
Definition SemanticTypes.h:882
bool IsWeak() const
Definition SemanticTypes.h:902
Definition SemanticTypes.h:1269
bool HasValue() const
Definition SemanticTypes.h:1284
virtual const CNamedType * AsNamedType() const override
Definition SemanticTypes.h:1292
virtual CNamedType * AsNamedType() override
Definition SemanticTypes.h:1290
virtual bool IsExplicitlyConcrete() const override
Definition SemanticTypes.h:1347
CNamedType(CSemanticProgram &Program, CSymbol Name, const CTypeBase *ValueType, bool HasDefault)
Definition SemanticTypes.h:1273
virtual bool CanBeCustomAccessorDataType() const override
Definition SemanticTypes.h:1349
virtual UE_API CUTF8String AsCodeRecursive(ETypeSyntaxPrecedence OuterPrecedence, TArray< const CFlowType * > &VisitedFlowTypes, bool bLinkable, ETypeStringFlag Flag) const override
Definition SemanticTypes.cpp:598
CSymbol GetName() const
Definition SemanticTypes.h:1280
static constexpr ETypeKind StaticTypeKind
Definition SemanticTypes.h:1271
const CTypeBase * GetValueType() const
Definition SemanticTypes.h:1282
virtual bool IsPersistable() const override
Definition SemanticTypes.h:1343
UE_API const CTupleType & ToTupleType() const
Definition SemanticTypes.cpp:621
virtual bool IsExplicitlyCastable() const override
Definition SemanticTypes.h:1345
Class defining instance and class objects.
Definition SemanticTypes.h:608
virtual const CNominalType * AsNominalType() const override
Definition SemanticTypes.h:618
virtual const CDefinition * Definition() const =0
CNominalType(ETypeKind Kind, CSemanticProgram &Program)
Definition SemanticTypes.h:610
virtual UE_API CUTF8String AsCodeRecursive(ETypeSyntaxPrecedence OuterPrecedence, TArray< const CFlowType * > &VisitedFlowTypes, bool bLinkable, ETypeStringFlag Flag) const override
Definition SemanticTypes.cpp:78
A normal type: a head normal form of types where the head is not a parametric type instantiation.
Definition SemanticTypes.h:217
virtual const CNominalType * AsNominalType() const
Definition SemanticTypes.h:250
virtual SmallDefinitionArray FindTypeMember(const CSymbol &MemberName, EMemberOrigin Origin, const SQualifier &Qualifier, VisitStampType VisitStamp) const
Definition SemanticTypes.h:268
virtual const CTypeBase * GetInnerType() const
Definition SemanticTypes.h:247
virtual SmallDefinitionArray FindInstanceMember(const CSymbol &MemberName, EMemberOrigin Origin, const SQualifier &Qualifier, const CAstPackage *ContextPackage, VisitStampType VisitStamp) const
Definition SemanticTypes.h:266
TType const & AsChecked() const
Definition SemanticTypes.h:227
virtual bool IsExplicitlyConcrete() const =0
virtual bool IsPersistable() const =0
UE_API SmallDefinitionArray FindTypeMember(const CSymbol &MemberName, EMemberOrigin Origin, const SQualifier &Qualifier) const
Definition SemanticTypes.cpp:69
TType * AsNullable()
Definition SemanticTypes.h:233
virtual bool IsExplicitlyCastable() const =0
ETypeKind GetKind() const
Definition SemanticTypes.h:221
TType const * AsNullable() const
Definition SemanticTypes.h:236
bool IsA() const
Definition SemanticTypes.h:230
virtual const CNormalType & GetNormalType() const override
Definition SemanticTypes.h:271
UE_API SmallDefinitionArray FindInstanceMember(const CSymbol &MemberName, EMemberOrigin Origin, const SQualifier &Qualifier, const CAstPackage *ContextPackage=nullptr) const
Definition SemanticTypes.cpp:64
virtual const CTypeBase * GetReferenceValueType() const
Definition SemanticTypes.h:242
TType & AsChecked()
Definition SemanticTypes.h:224
CNormalType(ETypeKind Kind, CSemanticProgram &Program)
Definition SemanticTypes.h:219
virtual EComparability GetComparability() const
Definition SemanticTypes.h:253
Definition SemanticTypes.h:760
static const ETypeKind StaticTypeKind
Definition SemanticTypes.h:762
virtual bool IsPersistable() const override
Definition SemanticTypes.h:779
virtual bool IsExplicitlyConcrete() const override
Definition SemanticTypes.h:781
virtual bool CanBePredictsVarDataType() const override
Definition SemanticTypes.h:775
virtual CUTF8String AsCodeRecursive(ETypeSyntaxPrecedence OuterPrecedence, TArray< const CFlowType * > &VisitedFlowTypes, bool bLinkable, ETypeStringFlag Flag) const override
Definition SemanticTypes.h:769
virtual bool IsExplicitlyCastable() const override
Definition SemanticTypes.h:780
virtual bool CanBeCustomAccessorDataType() const override
Definition SemanticTypes.h:774
virtual EComparability GetComparability() const override
Definition SemanticTypes.h:778
const CTypeBase * GetValueType() const
Definition SemanticTypes.h:766
Definition SemanticTypes.h:685
virtual bool IsExplicitlyConcrete() const override
Definition SemanticTypes.h:703
virtual bool IsPersistable() const override
Definition SemanticTypes.h:699
virtual bool IsExplicitlyCastable() const override
Definition SemanticTypes.h:701
static const ETypeKind StaticTypeKind
Definition SemanticTypes.h:687
virtual CUTF8String AsCodeRecursive(ETypeSyntaxPrecedence OuterPrecedence, TArray< const CFlowType * > &VisitedFlowTypes, bool bLinkable, ETypeStringFlag Flag) const override
Definition SemanticTypes.h:692
virtual bool CanBeCustomAccessorDataType() const override
Definition SemanticTypes.h:705
Definition SemanticTypes.h:712
virtual bool IsPersistable() const override
Definition SemanticTypes.h:729
virtual const CTypeBase * GetReferenceValueType() const override
Definition SemanticTypes.h:719
virtual CUTF8String AsCodeRecursive(ETypeSyntaxPrecedence OuterPrecedence, TArray< const CFlowType * > &VisitedFlowTypes, bool bLinkable, ETypeStringFlag Flag) const override
Definition SemanticTypes.h:722
static const ETypeKind StaticTypeKind
Definition SemanticTypes.h:714
virtual bool IsExplicitlyCastable() const override
Definition SemanticTypes.h:731
virtual bool CanBeCustomAccessorDataType() const override
Definition SemanticTypes.h:735
virtual bool IsExplicitlyConcrete() const override
Definition SemanticTypes.h:733
Definition SemanticProgram.h:277
Symbol representing a text string with an associated id.
Definition Symbol.h:98
Definition SemanticTypes.h:1008
virtual UE_API EComparability GetComparability() const override
Definition SemanticTypes.cpp:195
int32_t NumNonNamedElements() const
Definition SemanticTypes.h:1031
virtual bool IsExplicitlyConcrete() const override
Definition SemanticTypes.h:1043
static const ETypeKind StaticTypeKind
Definition SemanticTypes.h:1010
const CTypeBase * operator[](int32_t Index) const
Definition SemanticTypes.h:1024
virtual UE_API CUTF8String AsCodeRecursive(ETypeSyntaxPrecedence OuterPrecedence, TArray< const CFlowType * > &VisitedFlowTypes, bool bLinkable, ETypeStringFlag Flag) const override
Definition SemanticTypes.cpp:162
virtual UE_API bool IsPersistable() const override
Definition SemanticTypes.cpp:212
virtual UE_API CUTF8String AsParamsCode(ETypeSyntaxPrecedence OuterPrecedence, TArray< const CFlowType * > &VisitedFlowTypes, bool WithColon, ETypeStringFlag Flag) const override
Definition SemanticTypes.cpp:171
TArrayG< const CTypeBase *, TInlineElementAllocator< 4 > > ElementArray
Definition SemanticTypes.h:1012
ULANG_FORCEINLINE int32_t Num() const
Definition SemanticTypes.h:1023
int32_t GetFirstNamedIndex() const
Definition SemanticTypes.h:1030
UE_API ElementArray ElementsWithSortedNames() const
Definition SemanticTypes.cpp:224
virtual bool IsExplicitlyCastable() const override
Definition SemanticTypes.h:1042
UE_API const CNamedType * FindNamedType(CSymbol Name) const
Definition SemanticTypes.cpp:244
virtual bool CanBeCustomAccessorDataType() const override
Definition SemanticTypes.h:1037
CTupleType(CSemanticProgram &Program, ElementArray &&Elements, int32_t FirstNamedIndex)
Definition SemanticTypes.h:1014
ULANG_FORCEINLINE bool TryMarkVisited(VisitStampType VisitStamp) const
Definition SemanticTypes.h:1021
const ElementArray & GetElements() const
Definition SemanticTypes.h:1025
Base class for all types.
Definition SemanticTypes.h:138
virtual const CNormalType & GetNormalType() const =0
virtual const CAliasType * AsAliasType() const
Definition SemanticTypes.h:156
virtual CFlowType * AsFlowType()
Definition SemanticTypes.h:152
virtual ~CTypeBase()
Definition SemanticTypes.h:141
CUTF8String AsParamsCode(ETypeSyntaxPrecedence OuterPrecedence=ETypeSyntaxPrecedence::Min, ETypeStringFlag Flag=ETypeStringFlag::Simple) const
Definition SemanticTypes.h:182
CSemanticProgram & GetProgram() const
Definition SemanticTypes.h:143
virtual const CFlowType * AsFlowType() const
Definition SemanticTypes.h:154
virtual bool CanBePredictsVarDataType() const
Definition SemanticTypes.h:160
CTypeBase(CSemanticProgram &Program)
Definition SemanticTypes.h:140
virtual CNamedType * AsNamedType()
Definition SemanticTypes.h:148
virtual CUTF8String AsParamsCode(ETypeSyntaxPrecedence OuterPrecedence, TArray< const CFlowType * > &VisitedFlowTypes, bool WithColon, ETypeStringFlag Flag=ETypeStringFlag::Simple) const
Definition SemanticTypes.h:188
CUTF8String AsCode(ETypeSyntaxPrecedence OuterPrecedence=ETypeSyntaxPrecedence::Min, ETypeStringFlag Flag=ETypeStringFlag::Simple) const
Definition SemanticTypes.h:167
CUTF8String AsLinkableCode() const
Definition SemanticTypes.h:202
virtual CUTF8String AsCodeRecursive(ETypeSyntaxPrecedence OuterPrecedence, TArray< const CFlowType * > &VisitedFlowTypes, bool bLinkable, ETypeStringFlag Flag) const =0
virtual bool CanBeCustomAccessorDataType() const =0
virtual const CNamedType * AsNamedType() const
Definition SemanticTypes.h:150
Definition SemanticTypes.h:381
bool IsExplicitlyConcrete() const override
Definition SemanticTypes.h:414
bool IsCastableSubtype() const
Definition SemanticTypes.h:412
CTypeType(CSemanticProgram &Program, const CTypeBase *NegativeType, const CTypeBase *PositiveType)
Definition SemanticTypes.h:385
static const ETypeKind StaticTypeKind
Definition SemanticTypes.h:383
const CTypeBase * PositiveType() const
Definition SemanticTypes.h:406
virtual UE_API CUTF8String AsCodeRecursive(ETypeSyntaxPrecedence OuterPrecedence, TArray< const CFlowType * > &VisitedFlowTypes, bool bLinkable, ETypeStringFlag Flag) const override
Definition SemanticTypes.cpp:118
bool IsPersistable() const override
Definition SemanticTypes.h:408
virtual bool CanBeCustomAccessorDataType() const override
Definition SemanticTypes.h:452
bool IsConcreteSubtype() const
Definition SemanticTypes.h:416
bool IsExplicitlyCastable() const override
Definition SemanticTypes.h:410
const CTypeBase * NegativeType() const
Definition SemanticTypes.h:404
virtual SmallDefinitionArray FindInstanceMember(const CSymbol &MemberName, EMemberOrigin Origin, const SQualifier &Qualifier, const CAstPackage *ContextPackage, VisitStampType VisitStamp) const override
Definition SemanticTypes.h:394
Definition TypeVariable.h:21
Definition SemanticTypes.h:742
const CTypeBase * _ValueType
Definition SemanticTypes.h:753
CValueType(ETypeKind Kind, CSemanticProgram &Program, const CTypeBase *ValueType)
Definition SemanticTypes.h:744
virtual const CTypeBase * GetInnerType() const override
Definition SemanticTypes.h:747
Definition Array.h:51
ULANG_FORCEINLINE int32_t Num() const
Definition Array.h:402
Definition Function.h:839
Definition Set.h:13
Definition UniquePointerArray.h:16
TUTF8StringBuilder & Append(UTF8Char Char)
Definition UTF8StringBuilder.h:323
StringType MoveToString()
Definition UTF8StringBuilder.h:257
ULANG_FORCEINLINE const char * AsCString() const
Definition UTF8String.h:50
VERSECOMPILER_API bool IsSubtype(const CTypeBase *PositiveType1, const CTypeBase *PositiveType2, const uint32_t UploadedAtFnVersion)
Determine if PositiveType1 is a subtype of PositiveType2
Definition SemanticTypes.cpp:2961
VERSECOMPILER_API const CTypeBase * Meet(const CTypeBase *Type1, const CTypeBase *Type2, const uint32_t UploadedAtFnVersion)
Compute the meet of Type1 and Type2: the "greatest" type that contains only values contained by both ...
Definition SemanticTypes.cpp:3820
VERSECOMPILER_API const CTypeBase & AsPositive(const CTypeBase &, const TArray< SInstantiatedTypeVariable > &)
Definition SemanticTypes.cpp:1564
VERSECOMPILER_API const CTypeBase * DecayReference(const CTypeBase *)
Definition SemanticTypes.cpp:5306
VERSECOMPILER_API void FillTypeVariablePolarities(const CTypeBase *, ETypePolarity, STypeVariablePolarities &)
Definition SemanticTypes.cpp:5590
VERSECOMPILER_API const CTypeBase * RemovePointer(const CTypeBase *Type, ETypePolarity Polarity)
Definition SemanticTypes.cpp:5219
VERSECOMPILER_API void FillTypeVariablePolaritiesImpl(const CTypeBase *, ETypePolarity, STypeVariablePolarities &, TArray< SNormalTypePolarity > &Visited)
Definition SemanticTypes.cpp:5325
VERSECOMPILER_API bool IsAttributeType(const CTypeBase *Type)
Definition SemanticTypes.cpp:4694
VERSECOMPILER_API const CTypeBase * Substitute(const CTypeBase &, ETypePolarity Polarity, const TArray< STypeVariableSubstitution > &InstTypeVariables)
Definition SemanticTypes.cpp:683
bool IsStringType(const CNormalType &NormalType)
Definition SemanticTypes.h:1534
VERSECOMPILER_API const CTypeBase * Join(const CTypeBase *Type1, const CTypeBase *Type2, const uint32_t UploadedAtFnVersion)
Compute the join of Type1 and Type2: the "least" type that contains all values contained by either Ty...
Definition SemanticTypes.cpp:3287
VERSECOMPILER_API CClassDefinition * EnclosingClassOfDataDefinition(const CDataDefinition *Def)
Definition SemanticTypes.cpp:5289
VERSECOMPILER_API void ForEachDataType(const CTypeBase *, const TFunction< void(const CTypeBase *)> &)
Definition SemanticTypes.cpp:4890
VERSECOMPILER_API const CTypeBase & SkipEmptyFlowType(const CTypeBase &)
Definition SemanticTypes.cpp:3059
VERSECOMPILER_API const CTypeBase * RemoveReference(const CTypeBase *Type, ETypePolarity Polarity)
Definition SemanticTypes.cpp:5234
VERSECOMPILER_API bool Constrain(const CTypeBase *PositiveType1, const CTypeBase *NegativeType2, const uint32_t UploadedAtFnVersion)
Constrain PositiveType1 to be a subtype of NegativeType2
Definition SemanticTypes.cpp:2955
VERSECOMPILER_API void ForEachDataTypeRecursive(const CTypeBase *, const TFunction< void(const CTypeBase *)> &)
Definition SemanticTypes.cpp:5014
bool IsAgentTypeExclusive(const CTypeBase *Type)
Definition SemanticTypes.cpp:5066
VERSECOMPILER_API const char * IsEditableToCMessage(EIsEditable IsEditable)
Definition SemanticTypes.cpp:5028
VERSECOMPILER_API void VisitAllDefinitions(const CTypeBase *Type, const CAstPackage *VisitorPackage, const TFunction< void(const CDefinition &, const CSymbol &)> &Functor)
Definition SemanticTypes.cpp:4706
VERSECOMPILER_API const CTypeBase & AsPolarity(const CTypeBase &, const TArray< SInstantiatedTypeVariable > &, ETypePolarity)
Definition SemanticTypes.cpp:1555
VERSECOMPILER_API const CTypeBase & SkipIdentityFlowType(const CFlowType &, ETypePolarity, const uint32_t UploadedAtFnVersion)
Definition SemanticTypes.cpp:3040
VERSECOMPILER_API bool Matches(const CTypeBase *PositiveType1, const CTypeBase *NegativeType2, const uint32_t UploadedAtFnVersion)
Determine if argument PositiveType1 is a match for parameter NegativeType2
Definition SemanticTypes.cpp:2971
VERSECOMPILER_API EIsEditable IsEditableType(const uLang::CTypeBase *Type, const CAstPackage *ContextPackage)
Definition SemanticTypes.cpp:5073
VERSECOMPILER_API TArray< STypeVariableSubstitution > Instantiate(const TArray< const CTypeVariable * > &TypeVariables, const uint32_t UploadedAtFnVersion)
Definition SemanticTypes.cpp:1025
VERSECOMPILER_API const CNormalType & StripVariableAndConstraints(const CNormalType &)
Definition SemanticTypes.cpp:5249
VERSECOMPILER_API bool IsUnknownType(const CTypeBase *Type)
Definition SemanticTypes.cpp:4688
VERSECOMPILER_API EIsEditable IsEditableClassType(const uLang::CTypeBase *Type)
Definition SemanticTypes.cpp:5171
bool IsLeaderboardType(const CNormalType &NormalType)
Definition SemanticTypes.cpp:5056
VERSECOMPILER_API const CInterface * AsSingleInterface(const CNormalType &NegativeType, const CNormalType &PositiveType)
Definition SemanticTypes.cpp:650
bool IsMessageType(const CNormalType &NormalType)
Definition SemanticTypes.cpp:5048
VERSECOMPILER_API bool AreDomainsDistinct(const CTypeBase *DomainType1, const CTypeBase *DomainType2, const uint32_t UploadedAtFnVersion)
Determine whether there two types are distinct; i.e. that there are no values that are members of bot...
Definition SemanticTypes.cpp:4605
VERSECOMPILER_API const CTypeBase & Canonicalize(const CTypeBase &)
Definition SemanticTypes.cpp:1450
VERSECOMPILER_API const CClass * AsSingleClass(const CNormalType &NegativeType, const CNormalType &PositiveType)
Definition SemanticTypes.cpp:631
EIsEditable
Definition SemanticTypes.h:1552
VERSECOMPILER_API bool IsEquivalent(const CTypeBase *PositiveType1, const CTypeBase *PositiveType2, const uint32_t UploadedAtFnVersion)
Determine if PositiveType1 is equivalent to PositiveType2
Definition SemanticTypes.cpp:2966
VERSECOMPILER_API const CTypeBase & AsNegative(const CTypeBase &, const TArray< SInstantiatedTypeVariable > &)
Definition SemanticTypes.cpp:1569
Definition VVMEngineEnvironment.h:23
const char * TypeKindAsCString(ETypeKind Type)
Definition SemanticTypes.cpp:24
ETypeSyntaxPrecedence
Definition SemanticTypes.h:100
constexpr TCases< Args... > Cases
Definition Cases.h:35
ETypePolarity FlipPolarity(ETypePolarity Polarity)
Definition SemanticTypes.h:1133
uint32_t VisitStampType
Used to mark scopes already visited during a search.
Definition VisitStamp.h:11
ETypePolarity
Definition SemanticTypes.h:1131
ETypeKind
Definition SemanticTypes.h:92
VISIT_KIND(Name, CppType)
uLang::TUTF8String< CHeapRawAllocator > CUTF8String
A string allocated on the heap.
Definition UTF8String.h:269
ETypeStringFlag
Definition SemanticTypes.h:121
ETypeConstraintFlags
Definition SemanticTypes.h:127
ULANG_FORCEINLINE TRemoveReference< T >::Type && Move(T &&Obj)
Definition References.h:86
TRangeView< T *, T * > SingletonRangeView(T &Arg)
Definition RangeView.h:77
EComparability
Definition SemanticTypes.h:113
EMemberOrigin
Specifies whether to find only member definitions originating in the current type,...
Definition MemberOrigin.h:10
const char * GetConstraintTypeAsCString(ETypeConstraintFlags TypeConstraints, bool bIsSubtype)
Definition SemanticTypes.cpp:36
U16 Index
Definition radfft.cpp:71
Definition VstNode.h:1131
Definition SemanticTypes.h:481
friend bool operator!=(const Key &Left, const Key &Right)
Definition SemanticTypes.h:489
friend bool operator==(const Key &Left, const Key &Right)
Definition SemanticTypes.h:484
friend bool operator<(const Key &Left, const Key &Right)
Definition SemanticTypes.h:494
const CTypeBase * SuperType
Definition SemanticTypes.h:482
Definition SemanticTypes.h:554
friend bool operator!=(const Key &Left, const Key &Right)
Definition SemanticTypes.h:562
friend bool operator==(const Key &Left, const Key &Right)
Definition SemanticTypes.h:557
friend bool operator<(const Key &Left, const Key &Right)
Definition SemanticTypes.h:567
const CTypeBase * SuperType
Definition SemanticTypes.h:555
Definition SemanticTypes.h:639
friend bool operator!=(const Key &Left, const Key &Right)
Definition SemanticTypes.h:650
const CTypeBase * PositiveValueType
Definition SemanticTypes.h:641
const CTypeBase * NegativeValueType
Definition SemanticTypes.h:640
friend bool operator==(const Key &Left, const Key &Right)
Definition SemanticTypes.h:643
friend bool operator<(const Key &Left, const Key &Right)
Definition SemanticTypes.h:657
Definition SemanticTypes.h:959
friend bool operator<(const SKey &Left, const SKey &Right)
Definition SemanticTypes.h:974
const CTypeBase * _KeyType
Definition SemanticTypes.h:960
friend bool operator==(const SKey &Left, const SKey &Right)
Definition SemanticTypes.h:964
friend bool operator!=(const SKey &Left, const SKey &Right)
Definition SemanticTypes.h:969
bool _bWeak
Definition SemanticTypes.h:962
const CTypeBase * _ValueType
Definition SemanticTypes.h:961
Definition SemanticTypes.h:1295
friend bool operator!=(const Key &Left, const Key &Right)
Definition SemanticTypes.h:1308
friend bool operator==(const Key &Left, const Key &Right)
Definition SemanticTypes.h:1300
const CTypeBase * ValueType
Definition SemanticTypes.h:1297
bool HasValue
Definition SemanticTypes.h:1298
CSymbol Name
Definition SemanticTypes.h:1296
friend bool operator<(const Key &Left, const Key &Right)
Definition SemanticTypes.h:1316
Definition SemanticTypes.h:419
friend bool operator!=(const Key &Left, const Key &Right)
Definition SemanticTypes.h:430
friend bool operator==(const Key &Left, const Key &Right)
Definition SemanticTypes.h:423
const CTypeBase * PositiveType
Definition SemanticTypes.h:421
const CTypeBase * NegativeType
Definition SemanticTypes.h:420
friend bool operator<(const Key &Left, const Key &Right)
Definition SemanticTypes.h:437
Definition Effects.h:46
Definition SemanticTypes.h:1207
const CTypeBase * _PositiveType
Definition SemanticTypes.h:1209
friend bool operator==(const SInstantiatedTypeVariable &Left, const SInstantiatedTypeVariable &Right)
Definition SemanticTypes.h:1217
const CTypeBase * _NegativeType
Definition SemanticTypes.h:1208
SInstantiatedTypeVariable(const CTypeBase *NegativeType, const CTypeBase *PositiveType)
Definition SemanticTypes.h:1211
Definition SemanticTypes.h:1453
friend bool operator==(const SNormalTypePolarity &Left, const SNormalTypePolarity &Right)
Definition SemanticTypes.h:1457
const CNormalType * NormalType
Definition SemanticTypes.h:1454
const ETypePolarity Polarity
Definition SemanticTypes.h:1455
Information about a given qualifier.
Definition Definition.h:35
Definition SemanticTypes.h:1432
ETypePolarity Polarity
Definition SemanticTypes.h:1434
friend bool operator<(const STypeVariablePolarity &Left, const STypeVariablePolarity &Right)
Definition SemanticTypes.h:1436
const CTypeVariable * TypeVariable
Definition SemanticTypes.h:1433
Definition SemanticTypes.h:1185
friend bool operator==(const STypeVariableSubstitution &Left, const STypeVariableSubstitution &Right)
Definition SemanticTypes.h:1197
const CTypeBase * _PositiveType
Definition SemanticTypes.h:1188
const CTypeVariable * _TypeVariable
Definition SemanticTypes.h:1186
STypeVariableSubstitution(const CTypeVariable *TypeVariable, const CTypeBase *NegativeType, const CTypeBase *PositiveType)
Definition SemanticTypes.h:1190
const CTypeBase * _NegativeType
Definition SemanticTypes.h:1187
Definition RangeView.h:9