Commit Graph

111 Commits

Author SHA1 Message Date
Johan Torp
36f7fa0521 Various engine init optimizations and new string conversion paths
* Added some core string conversion paths
* Added FString::Append() and += overloads to avoid pointless temporaries when appending c strings and various other string types
* Added UTF32 <-> TCHAR string conversion macros
* Optimized QuotedString parsing
* Optimized property parsing
* PackageName optimizations
* SoftObjectPath optimizations

#jira none
#rb see original changelists
#ushell-cherrypick of 11932317 by Johan.Torp
#ushell-cherrypick of 11932319 by Johan.Torp
#ushell-cherrypick of 11932321 by Johan.Torp
#ushell-cherrypick of 11932322 by Johan.Torp
#ushell-cherrypick of 11932324 by Johan.Torp
#ushell-cherrypick of 11932462 by Johan.Torp
#ushell-cherrypick of 11934123 by Johan.Torp
#ushell-cherrypick of 12000177 by Johan.Torp
#ushell-cherrypick of 12000183 by Johan.Torp
#ushell-cherrypick of 12114232 by Johan.Torp

[CL 12147981 by Johan Torp in 4.25 branch]
2020-03-12 08:11:14 -04:00
Josh Adams
aa9705149b Copying Private-LoadTimes-4.24 stream to Main. Biggest changes are in Materials/Shader memory freezing.
#rb none

[CL 11282608 by Josh Adams in Main branch]
2020-02-06 13:13:41 -05:00
Stefan Boberg
55a8b15f1f Copying //UE4/Dev-Core to Main (//UE4/Main)
#rb none

[CL 11258477 by Stefan Boberg in Main branch]
2020-02-05 14:26:36 -05:00
johan torp
311fdd05a4 Fix unterminated number parsing for new FName constructors with fix length
Alternate fix that does not copy the number

#rb devin.doucette


#ROBOMERGE-SOURCE: CL 11214724 via CL 11214728
#ROBOMERGE-BOT: (v644-11213502)

[CL 11214730 by johan torp in Main branch]
2020-02-04 10:57:21 -05:00
devin doucette
f8c129b742 Add tests for parsing names with numbers from unterminated strings
Requested in review https://p4-swarm.epicgames.net/reviews/11200485 for CL 11201262.

#rb Johan.Torp, Matt.Peters
#rnx


#ROBOMERGE-SOURCE: CL 11214474 via CL 11214481
#ROBOMERGE-BOT: (v644-11213502)

[CL 11214484 by devin doucette in Main branch]
2020-02-04 10:35:50 -05:00
devin doucette
c5f6dafc25 Fix FName number parsing from unterminated strings
Copy the number to a temporary buffer until we have an overload of Atoi64 that takes the input length. The generic implementation of Atoi64 for TCHAR converts the input to ASCII then converts that to an integer. For unterminated strings, this could cause an access violation or convert an obscenely large input to ASCII.

#rb Johan.Torp, Matt.Peters


#ROBOMERGE-SOURCE: CL 11201262 via CL 11201265
#ROBOMERGE-BOT: (v640-11091645)

[CL 11201273 by devin doucette in Main branch]
2020-01-31 17:14:27 -05:00
christina tempelaarl
fe7b1f4718 Added PhysicalMaterialMasks.
#jira UE-1949, UE-1950
#rb benn.gallagher, matt.kuhlenschmidt


#ROBOMERGE-SOURCE: CL 11125982 via CL 11126447
#ROBOMERGE-BOT: (v640-11091645)

[CL 11126552 by christina tempelaarl in Main branch]
2020-01-28 05:18:40 -05:00
PJ Kack
ef8a7b620e AUTO MERGE
Merging //UE4/Main @ 11112898 to //UE4/Dev-Core (dev-core-l0178)

#rb none

(ushell-p4-mergedown)

[CL 11113593 by PJ Kack in Dev-Core branch]
2020-01-26 11:35:42 -05:00
christina tempelaarl
d87c5e9cfe Back out changelist 11112514
#ROBOMERGE-SOURCE: CL 11112640 via CL 11112641
#ROBOMERGE-BOT: (v640-11091645)

[CL 11112642 by christina tempelaarl in Main branch]
2020-01-25 00:34:35 -05:00
christina tempelaarl
62fb7bd1a5 Added PhysicalMaterialMasks.
#jira UE-1949, UE1950
#rb matt.kuhlenschmidt, benn.gallagher


#ROBOMERGE-SOURCE: CL 11112514 via CL 11112515
#ROBOMERGE-BOT: (v640-11091645)

[CL 11112518 by christina tempelaarl in Main branch]
2020-01-24 23:29:37 -05:00
Johan Torp
4b36ea73b2 Tiny optimization when comparing FName to nullptr or empty C string
#rb trivial

[CL 11080386 by Johan Torp in Dev-Core branch]
2020-01-22 06:19:29 -05:00
Johan Torp
46b947ad60 Fix FName batch loading check OldUsedSlots == UsedSlots in EngineTest
Very early batch loading reserve didn't acquire lock and in the EngineTest case other threads were creating FNames in parallel

#jira UE-87097
#rb trivial

[CL 11071675 by Johan Torp in Dev-Core branch]
2020-01-21 09:01:08 -05:00
michael noland
2d6847d01a Core: Fixes for various unsafe implicit type conversion warnings in the Core module (WIP; some files still suppress the warning)
- Ptrdiff -> int32
- Float/int confusion and double/float
- size_t stuff; various changes to the algorithms to use a deduced IndexType template argument and/or decltype to use the appropriate size for indicies and counts
- Fixed GetNum(FString) incorrectly returning SIZE_T instead of int32, and GetNum(container) now returns whatever container.Num() does (so usually int32)
#jira UE-86949
#rb marc.audy, steve.robb


#ROBOMERGE-OWNER: michael.noland
#ROBOMERGE-AUTHOR: michael.noland
#ROBOMERGE-SOURCE: CL 11050799 via CL 11050828 via CL 11050837
#ROBOMERGE-BOT: (v637-11041722)

[CL 11051763 by michael noland in Main branch]
2020-01-17 13:49:41 -05:00
Johan Torp
d9438a1ada Added FName length bounds-checking on top of existing checks to guard against malicious input in shipping builds
#jira FORT-242755
#rb steve.robb

#ROBOMERGE-SOURCE: CL 10950274 in //Fortnite/Main/...
#ROBOMERGE-BOT: FORTNITE (Main -> Dev-EngineMerge) (v632-10940481)


#ushell-cherrypick of 10950275 by johan.torp

[CL 10950290 by Johan Torp in Main branch]
2020-01-13 03:34:02 -05:00
bob tellez
b45dee0e5f Fix physics guid being incremented accidentally (which broke chaos serialization)
#rb none
[FYI] Michael.Lentine


#ROBOMERGE-OWNER: bob.tellez
#ROBOMERGE-AUTHOR: ori.cohen
#ROBOMERGE-SOURCE: CL 10882491 via CL 10885108 via CL 10885109 via CL 10885110
#ROBOMERGE-BOT: (v626-10872990)

[CL 10885111 by bob tellez in Main branch]
2020-01-06 19:51:22 -05:00
ryan durand
0f0464a30e Updating copyright for Engine Runtime.
#rnx
#rb none


#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870549 by ryan durand in Main branch]
2019-12-26 14:45:42 -05:00
michael lentine
e01466d45a Merge CL 10786951 by hand to avoid breaking the build.
#rb none


#ROBOMERGE-SOURCE: CL 10786987 via CL 10787000 via CL 10787014
#ROBOMERGE-BOT: (v610-10636431)

[CL 10787041 by michael lentine in Main branch]
2019-12-18 01:11:26 -05:00
Robert Manuszewski
7b6f840f7f Copying //UE4/Dev-Core @ 10708550 to Dev-Main (//UE4/Dev-Main)
#rb none

[CL 10708666 by Robert Manuszewski in Main branch]
2019-12-13 11:07:03 -05:00
dan phillips
173d725a7c Take advantage of extra memory if a platform supports it
[REVIEW] ben.woodhouse, david.harvey


#ROBOMERGE-SOURCE: CL 10497628 via CL 10497636 via CL 10497638 via CL 10497681
#ROBOMERGE-BOT: (v606-10482310)

[CL 10497689 by dan phillips in Main branch]
2019-12-03 12:41:20 -05:00
Johan Torp
e94b3ffb22 FLazyName fixes and improvements
* Fixed number parsing
* Narrow literals were eagerly resolved via implicit FName construction, added support for narrow literals
* Merged 32-bit and 64-bit implementations
* Added additional unit tests
* Moved some code to .cpp

#jira UE-81205
#rb steve.robb

[CL 9630060 by Johan Torp in Main branch]
2019-10-17 02:20:42 -04:00
Johan Torp
0bc9385442 Deprecated FCustomVersionContainer::GetRegistered() and replaced it with a new thread-safe API
#rb pj.kack, steve.robb
#jira UE-80965

[CL 9566352 by Johan Torp in Main branch]
2019-10-14 04:49:48 -04:00
Johan Torp
857d661ebe Added FLazyName number support
#rb steve.robb
#jira UE-81205

[CL 9470698 by Johan Torp in Main branch]
2019-10-08 04:23:55 -04:00
johan torp
829222badc Make FName detect number strings between int32 and uint32 max, even though FName's number is signed.
These semantics match the old UE 4.22 FName implementation.

#jira UE-81464
#rb pj.kack
#lockdown nick.penwarden
[FYI] stefan.boberg

#ROBOMERGE-SOURCE: CL 9470664 in //UE4/Release-4.23/...
#ROBOMERGE-BOT: RELEASE (Release-4.23 -> Main) (v501-9460993)

[CL 9470669 by johan torp in Main branch]
2019-10-08 04:09:40 -04:00
Stefan Boberg
1f813eb516 Copying //UE4/Dev-Core to Main (//UE4/Main)
#rb many

[CL 9405827 by Stefan Boberg in Main branch]
2019-10-03 16:26:48 -04:00
jordan cristiano
304820b88d Added missing ELLMTag::Fname scopes around FName allocs.
This steals back some of the LLM tagged memory from other categories that should have been marked as FName.

In MB:
AssetRegistry:  61.98   -> 43.60
AsyncLoading:   25.27   -> 19.54
EngineInit:     20.12   -> 19.12
EnginePreInit:  38.33   -> 13.33
GC:             10.21   -> 7.57
Stats:          51.10   -> 50.78
UObject:        270.85  -> 268.20
Untagged:       32.30   -> 30.67
FName:          0       -> 54.25

#rb johan.torp
[FYI] andrew.ladenberger
#rnx


#ROBOMERGE-SOURCE: CL 9390082 via CL 9390083 via CL 9390086 via CL 9390089
#ROBOMERGE-BOT: (v456-9359915)

[CL 9392212 by jordan cristiano in Main branch]
2019-10-03 11:10:25 -04:00