1) Refactored preparsing to scan for @UCLASS, @USTRUCT, and @ENUM and define then. This means that no new entries into the type definition info system will be added after pre-parsing and thus remove the need for any type of locking during code generation.
2) Parsing and code generation is now being done in a strict order based on dependencies and no longer by project. This removes the need of explicitly parsing depedencies first or waiting on hashes to be computed. (Provided a 50%-80% improvement in code generation time)
3) Changed HeaderParser to be specific to one source file. Removed the need to pass the source file around since it is always known at construction time. Simplified some error handling logic.
4) Changed parallel for loops to using event graph to provide more concurrency.
5) Refactored the main program flow into concise steps.
Testing:
Verified that the headers generated exactly the same for:
1) First person C++ Project
2) UnrealEditor
3) QAGame
4) ShooterGame
5) FortniteGame
FYI: Marc had reviewed this as part of a larger change but some parts were extract. These are the remaining changes.
#rb marc.audy
#rnx
#preflight 6078666a02850d00010e22c5
[CL 16023636 by Tim Smith in ue5-main branch]
Moving the UHTConfig to BaseParser along with a support routine to be used by a future change.
#rb trivial
#rnx
#preflight 607764150af8c60001c4a435
[CL 16013445 by Tim Smith in ue5-main branch]
New mechanism for maintaining the overall result.
Helper methods for making try blocks.
Work in progress
#rb steve.robb
#rnx
#preflight 607706d22674e100018f74af
[CL 16006480 by Tim Smith in ue5-main branch]
This avoids a race condition with lazy initialization.
#rb steve.robb
#rnx
#preflight 606f00331e3c670001e4f483
[CL 15954147 by Tim Smith in ue5-main branch]
Removed some unused functionality in FScriptLocation that wasn't being used and depended on a global variable.
#rb devin.doucette
[CL 15726794 by Tim Smith in ue5-main branch]
Allow UnrealObjectPtrTool to perform reverse upgrades when the "-r" commandline argument is used. Also added functionality to allow UnrealHeaderTool to dump out necessary log messages specifying TObjectPtr member declrations for UnrealObjectPtrTool to consume.
Tested by:
1) Performing a new forward pointer upgrade (from a new UHT log) and confirming the resulting files had zero diffs when compared to a shelf of upgraded files from previous version of UnrealObjectPtrTool.
2) Performed a forward pointer upgrade, then a reverse pointer upgrade then reverted all unchanged files. The remaining files (13 of them see shelved CL15213431) only had trailing whitespace corrections due to the deliberate choices for trailing whitespace manipulation when doing forward upgrades.
#rb devin.doucette
[CL 15219628 by Zousar Shaker in ue5-main branch]
GetVarType is the function that strips the inline and FORCEINLINE keywords, but that function call was being skipped for void return types. The result was that things like "inline void" failed to parse as a UHT return type, but "inline int32" worked fine.
#fyi Steve.Robb
#rb Marc.Audy
[CL 14310987 by Jamie Dale in ue5-main branch]
Support for namespaced native types in UHT.
Some obvious string optimizations.
#fyi Steve.Robb
#rb Steve.Robb
[CL 13991135 by Jamie Dale in ue5-main branch]
#rb Michael.Noland
#jira
#rnx
#ROBOMERGE-SOURCE: CL 13191242 via CL 13191244 via CL 13191248
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v688-13145358)
[CL 13191250 by marc audy in Main branch]
(should have been part of CL# 13181587)
#rb trivial
#rnx
#jira
#ROBOMERGE-SOURCE: CL 13184134 via CL 13184139 via CL 13184164
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v688-13145358)
[CL 13184172 by marc audy in Main branch]
#rb Michael.Noland
#rnx
#jira
#ROBOMERGE-SOURCE: CL 13183805 via CL 13183813 via CL 13183823
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v688-13145358)
[CL 13183833 by marc audy in Main branch]