Add dedicated empty array enumerator for footprint reduction (#82899)
authorStephen Toub <stoub@microsoft.com>
Thu, 2 Mar 2023 21:19:51 +0000 (16:19 -0500)
committerGitHub <noreply@github.com>
Thu, 2 Mar 2023 21:19:51 +0000 (16:19 -0500)
commit32f6c070dc02bdb932e69c043912866b8d6a5d07
tree1cfda0ad9ea5899225e45c193a5f77f5b8fb8721
parent57e2c3a3e1e19eb8ef40e4a0db1011ad7b6af21e
Add dedicated empty array enumerator for footprint reduction (#82899)

* Add dedicated empty array enumerator for footprint reduction

Its singleton can be used in places where it's less likely the consumer will otherwise be using a T[], such that it's less likely we'll need to generate code for T[].

* Address PR feedback
src/libraries/System.Private.CoreLib/src/System/Array.Enumerators.cs
src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/ConditionalWeakTable.cs