Commit Graph

364 Commits

Author SHA1 Message Date
tim smith
44d5ca089f More UnrealHeaderTool refactoring
Remove FClass
Remove ClassDeclarationMetaData

#rb self
#rnx
#preflight 60a7c6140569f30001673b9c

#ROBOMERGE-SOURCE: CL 16419880 in //UE5/Main/... via CL 16419900
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Release-Engine-Staging) (v811-16416015)

[CL 16419907 by tim smith in ue5-release-engine-staging branch]
2021-05-21 11:53:24 -04:00
Tim Smith
5c7b33f9e5 More UnrealHeaderTool refactoring
Remove FClass
Remove ClassDeclarationMetaData

#rb self
#rnx
#preflight 60a7c6140569f30001673b9c

[CL 16419880 by Tim Smith in ue5-main branch]
2021-05-21 11:52:09 -04:00
tim smith
e03fe23827 Added new PropertyTypes which in the long run will be where different property types are implemented.
Added new casting system betwen the different type definitions.  This allows some patterns that makes the code easier.
Moved some direct calls to engine API to FClasses.
More property data moved to the property definition.
Replacing a many more instances of referencing engine type directly with referencing UHT types.
Removed the FToken from the property data.  Saved 600MB of memory on some titles.

#rb jonathan.adamczewski
#rnx

#ROBOMERGE-SOURCE: CL 16416114 in //UE5/Main/... via CL 16416116
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Release-Engine-Staging) (v811-16416015)

[CL 16416120 by tim smith in ue5-release-engine-staging branch]
2021-05-21 07:29:39 -04:00
Tim Smith
377b8798c5 Added new PropertyTypes which in the long run will be where different property types are implemented.
Added new casting system betwen the different type definitions.  This allows some patterns that makes the code easier.
Moved some direct calls to engine API to FClasses.
More property data moved to the property definition.
Replacing a many more instances of referencing engine type directly with referencing UHT types.
Removed the FToken from the property data.  Saved 600MB of memory on some titles.

#rb jonathan.adamczewski
#rnx

[CL 16416114 by Tim Smith in ue5-main branch]
2021-05-21 07:29:12 -04:00
marc audy
7e061a2900 PR #8049: Trim spaces in ExpandEnumAsExecs meta parameter (Contributed by zompi2)
#jira UE-116106
#rb Ben.Hoffman

#ROBOMERGE-SOURCE: CL 16393388 in //UE4/Release-4.27/... via CL 16393403
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Staging) (v804-16311228)

[CL 16393467 by marc audy in ue5-release-engine-staging branch]
2021-05-19 17:53:48 -04:00
Tim Smith
9915ffe5a7 Merging the base class structure into the main type info.
Produced a common inheritance parser.
Added error return for when verification fails

#rb jonathan.adamczewski
#rnx
#preflight 60a4ef3cb7ccb00001771494

[CL 16383144 by Tim Smith in ue5-main branch]
2021-05-19 07:42:12 -04:00
Tim Smith
2504290d2e Remove the compiler meta data manager.
Elimination of some quick to resolve type system lookups.

#rnx
#rb jonathan.adamczewski
#preflight 609e5a1dcbf9a40001fe9778

[CL 16328413 by Tim Smith in ue5-main branch]
2021-05-14 07:48:15 -04:00
Tim Smith
85fc123dc0 Removed the FTokenData and FPropertyData. Information has been moved to the type system.
#rb jonathan.adamczewski
#rnx
#preflight 609d0a38a5e8310001bc76ac

[CL 16311618 by Tim Smith in ue5-main branch]
2021-05-13 07:56:52 -04:00
Tim Smith
b854f16fff Remove the singleton type cache and the package name cache.
#rb jonathan.adamczewski
#rnx
#preflight 609c286edc97da0001256a61

[CL 16305562 by Tim Smith in ue5-main branch]
2021-05-12 16:27:07 -04:00
Andrew Davidson
3ddc3a4da3 Merge up from //UE5/Dev-LargeWorldCoordinates
#rb none

[CL 16211417 by Andrew Davidson in ue5-main branch]
2021-05-05 15:07:25 -04:00
aurel cordonnier
50944fd712 Merge UE5/RES @ 16162155 to UE5/Main
This represents UE4/Main @ 16130047 and Dev-PerfTest @ 16126156

[CL 16163576 by aurel cordonnier in ue5-main branch]
2021-04-29 19:32:06 -04:00
Tim Smith
e7ea9ed28b 1) Create the Function type information that provides the UHT data for functions.
2) Remove the global hash storage system since it is moved into the Function type information.
3) Remove some unsed classes and methods.
4) Added the TEMPORARY auto creation of base engine types until they can be added to the no export file.

#rb marc.audy
#rnx
#preflight 60893ddb2377910001be8638

[CL 16142341 by Tim Smith in ue5-main branch]
2021-04-28 07:34:10 -04:00
Tim Smith
40530ddda5 Fixing UHT pre-parsing issue exposed by the addition of UENUM And USTRUCT parsing.
#rb trivial
#rnx

#ushell-cherrypick of 16049621 by Tim.Smith

[CL 16050141 by Tim Smith in ue5-main branch]
2021-04-19 09:11:16 -04:00
Tim Smith
808f81dd6c Performance improvements and clean up in preperation for a Live Coding fix.
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]
2021-04-15 13:44:34 -04:00
Tim Smith
6de85bf8f7 Quick fix to Enum type definition constructor.
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]
2021-04-14 18:40:45 -04:00
Tim Smith
5c94acdaa1 Provide a more general exception class.
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]
2021-04-14 11:55:52 -04:00
Tim Smith
efd5202878 Move the initialization of constant configuration data into a class explicitly initialized at startup.
This avoids a race condition with lazy initialization.

#rb steve.robb
#rnx
#preflight 606f00331e3c670001e4f483

[CL 15954147 by Tim Smith in ue5-main branch]
2021-04-08 10:02:55 -04:00
Tim Smith
c002b94acf Cleanup the usage of FClasses. Remove the need to pass around AllClasses when the majority of the time, the methods being invoked could be static. Removed methods that are currently unused.
#rb steve.robb
#rnx

[CL 15948334 by Tim Smith in ue5-main branch]
2021-04-07 19:43:18 -04:00
Tim Smith
d9a3b5af20 Minor changes to stablize UHT code generation in preperation for more extensive performance changes.
#rb devin.doucette
#rnx

[CL 15915280 by Tim Smith in ue5-main branch]
2021-04-05 09:17:25 -04:00
Tim Smith
11119486ae Fix issue where if in a single include file, we define UMyInterface, implement IMyInterface, and implement the interface in a UObject, UHT would generate a circular dependency error.
The fix is to ignore identifier references that resolve to the same source file.

#rb none

[CL 15873286 by Tim Smith in ue5-main branch]
2021-03-31 07:49:15 -04:00
Tim Smith
35cc3755d2 Fixing a race condition with -WRITEREF and -VERIFYREF that would cause files to be missing.
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]
2021-03-17 13:16:36 -04:00
Zousar Shaker
bdfe4fff0f Split the representation in the reflection system of TObjectPtr fields into FObjectPtrProperty (derived from FObjectProperty and already existed since the introduction of wrapped object pointers) and a new FClassPtrProperty (derived from FClassProperty, and newly introduced in this change). As with raw pointers, UHT will generate code for one vs the other depending on whether the inner type is derived from UClass or not. The new reflection type is meant to be functionally equivalent to the existing one, except it changes how the PROPERTY (not the instance of the field on a containing object) is serialized to ensure it includes the MetaClass member as inherited from FClassProperty.
#rb robert.manuszewski

[CL 15317249 by Zousar Shaker in ue5-main branch]
2021-02-04 12:19:38 -04:00
Zousar Shaker
cf9bb3c4d1 Fix missing code in the way ObjectPtr properties handle inline attributes.
#jira UE-107444
#rb sebastian.nordgren

[CL 15280808 by Zousar Shaker in ue5-main branch]
2021-02-02 12:27:34 -04:00
Zousar Shaker
3cef6188a3 Prototype Wrapped Object Pointers (ObjectHandle/ObjectPtr)
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]
2021-01-27 14:46:30 -04:00
Marc Audy
ada7c144fa Merge //UE5/Release-Engine-Staging @14903491 to //UE5/Main
[CL 14906022 by Marc Audy in ue5-main branch]
2020-12-11 14:21:20 -04:00