UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
CompilerTypes.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
7
8namespace uLang
9{
10
11// Forward declarations
12enum class EAstNodeSetKey : uintptr_t;
13
25
30{
31 alignas(uint32_t) uint8_t Bytes[20]{};
32 static const FSolFingerprint Zero;
33
34 void Reset()
35 {
36 memset(Bytes, 0, sizeof(Bytes));
37 }
38
39 friend inline bool operator==(const FSolFingerprint& A, const FSolFingerprint& B)
40 {
41 return memcmp(A.Bytes, B.Bytes, sizeof(A.Bytes)) == 0;
42 }
43
44 friend inline bool operator!=(const FSolFingerprint& A, const FSolFingerprint& B)
45 {
46 return memcmp(A.Bytes, B.Bytes, sizeof(A.Bytes)) != 0;
47 }
48
50 {
51 const auto NibbleToHex = [](uint8_t Value) { return char(Value + (Value > 9 ? 'A' - 10 : '0')); };
52
54 const uint64_t CharLength = sizeof(Bytes) * 2;
56
57 const uint8_t* Data = Bytes;
58 char* WriteHead = (char*) Output.begin().CurrentByte();
59 for (const uint8_t* DataEnd = Data + sizeof(Bytes); Data != DataEnd; ++Data)
60 {
61 *WriteHead++ = NibbleToHex(*Data >> 4);
62 *WriteHead++ = NibbleToHex(*Data & 15);
63 }
64 *WriteHead++ = 0;
65 return Output;
66 }
67};
68inline const FSolFingerprint FSolFingerprint::Zero;
69
74
79{
80public:
82
84 virtual void Reset() = 0;
86 virtual void Update(const void* Data, uint64_t Size, const char* DebugContext = nullptr) = 0;
88 virtual FSolFingerprint Finalize(const char* DebugContext = nullptr) = 0;
89};
90
98
101{
103 TArray<CUTF8String> _UsedDependencies; // Only _directly_ used dependencies, not transitive closure
104};
105
111
114{
121 uint32_t _UploadedAtFNVersion = VerseFN::UploadedAtFNVersion::Latest;
122
125
127 enum class ELinkParam
128 {
129 RequireComplete, // Require complete link
130 Skip, // Skip link step
131 Default,
132 };
133
135
136 // HACK_VMSWITCH - remove this once VerseVM is fully brought up
137 // Specifies the VM we are compiling the code for
138 // We need a variable for this, since even though in most cases
139 // WITH_VERSE_BPVM will select the correct value, in the VNI tool we
140 // take this information from the command line
141 enum class EWhichVM
142 {
143 VerseVM,
144 BPVM
145 };
146#if WITH_VERSE_BPVM
148#else
150#endif
151
153 bool _bSemanticAnalysisOnly : 1 = false;
154
156 bool _bGenerateDigests : 1 = true;
157
159 bool _bGenerateCode : 1 = true;
160
162 bool _bQualifyIdentifiers : 1 = false;
163
165 bool _bVerbose : 1 = false;
166};
167
191
202
203} // namespace uLang
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
T * New(FMemStackBase &Mem, int32 Count=1, int32 Align=DEFAULT_ALIGNMENT)
Definition MemStack.h:259
uint32 Size
Definition VulkanMemory.cpp:4034
Definition Diagnostics.h:44
Definition SharedPointer.h:28
Definition CompilerTypes.h:79
virtual void Update(const void *Data, uint64_t Size, const char *DebugContext=nullptr)=0
virtual ~ISolFingerprintGenerator()
Definition CompilerTypes.h:81
virtual FSolFingerprint Finalize(const char *DebugContext=nullptr)=0
Definition Array.h:51
Definition SharedPointerArray.h:21
Definition SharedPointer.h:77
Definition UniquePointer.h:15
ULANG_FORCEINLINE UTF8Char * Resize(int32_t NewByteLen)
Definition UTF8String.h:42
Definition VVMEngineEnvironment.h:23
ULANG_FORCEINLINE TRemoveReference< T >::Type && Move(T &&Obj)
Definition References.h:86
Definition CompilerTypes.h:71
TArray< CUTF8String > _Updates
Definition CompilerTypes.h:72
Definition CompilerTypes.h:30
friend bool operator!=(const FSolFingerprint &A, const FSolFingerprint &B)
Definition CompilerTypes.h:44
uint8_t Bytes[20]
Definition CompilerTypes.h:31
CUTF8String ToCUTF8String() const
Definition CompilerTypes.h:49
void Reset()
Definition CompilerTypes.h:34
static const FSolFingerprint Zero
Definition CompilerTypes.h:32
friend bool operator==(const FSolFingerprint &A, const FSolFingerprint &B)
Definition CompilerTypes.h:39
Definition CompilerTypes.h:170
SToolchainInjections _AddedInjections
Additional API injections for the individual build pass only.
Definition CompilerTypes.h:174
TUPtr< SPackageUsage > _PackageUsage
Optional database of dependencies actually used by packages.
Definition CompilerTypes.h:178
TArray< CUTF8String > _BuiltInPackageNames
Name of package providing built-in functionality.
Definition CompilerTypes.h:176
TSRef< CDiagnostics > _Diagnostics
Accumulated issues/glitches over all compile phases.
Definition CompilerTypes.h:172
bool bCloneValidSnippetVsts
Allow the toolchain to reuse VSTs for files that haven't changed.
Definition CompilerTypes.h:183
SBuildParams _Params
Params passed into the Build command.
Definition CompilerTypes.h:180
SBuildContext()
Definition CompilerTypes.h:187
SBuildContext(TSRef< CDiagnostics > Diagnostics)
Definition CompilerTypes.h:185
Definition CompilerTypes.h:114
EWhichVM
Definition CompilerTypes.h:142
uint32_t _UploadedAtFNVersion
Definition CompilerTypes.h:121
bool _bQualifyIdentifiers
Whether to qualify all unidentified qualifiers in-place in the VST.
Definition CompilerTypes.h:162
bool _bGenerateCode
If to generate bytecode.
Definition CompilerTypes.h:159
bool _bSemanticAnalysisOnly
If true, we'll run the build only up to semantic analysis.
Definition CompilerTypes.h:153
EWhichVM _TargetVM
Definition CompilerTypes.h:149
ELinkParam
Link-step settings.
Definition CompilerTypes.h:128
ELinkParam _LinkType
Definition CompilerTypes.h:134
int32_t _MaxNumPersistentVars
Maximum number of allowed persistent var definitions.
Definition CompilerTypes.h:124
bool _bVerbose
Get more information.
Definition CompilerTypes.h:165
bool _bGenerateDigests
If to generate digests when possible.
Definition CompilerTypes.h:156
Definition CompilerTypes.h:93
TArray< CUTF8String > _Tokens
Definition CompilerTypes.h:94
TArray< CUTF8String > _Switches
Definition CompilerTypes.h:95
CUTF8String _Unparsed
Definition CompilerTypes.h:96
Definition CompilerTypes.h:101
CUTF8String _PackageName
Definition CompilerTypes.h:102
TArray< CUTF8String > _UsedDependencies
Definition CompilerTypes.h:103
Definition CompilerTypes.h:108
TArray< SPackageUsageEntry > _Packages
Definition CompilerTypes.h:109
Definition CompilerTypes.h:194
SProgramContext(const TSRef< CSemanticProgram > &Program)
Definition CompilerTypes.h:198
TSRef< CSemanticProgram > _Program
Whole view of checked program ready for conversion to runtime equivalent - its types,...
Definition CompilerTypes.h:196
Definition CompilerTypes.h:16
TSRefArray< IPreLinkInjection > _PreLinkInjections
Definition CompilerTypes.h:23
TSRefArray< IPostParseInjection > _PostParseInjections
Definition CompilerTypes.h:18
TSRefArray< IPreTranslateInjection > _PreTranslateInjections
Definition CompilerTypes.h:22
TSRefArray< IIntraSemAnalysisInjection > _IntraSemAnalysisInjections
Definition CompilerTypes.h:20
TSRefArray< IPreSemAnalysisInjection > _PreSemAnalysisInjections
Definition CompilerTypes.h:19
TSRefArray< IPreParseInjection > _PreParseInjections
Definition CompilerTypes.h:17
TSRefArray< IPostSemAnalysisInjection > _PostSemAnalysisInjections
Definition CompilerTypes.h:21