Bring back old array enumerator code (#88371)
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Fri, 7 Jul 2023 07:38:43 +0000 (16:38 +0900)
committerGitHub <noreply@github.com>
Fri, 7 Jul 2023 07:38:43 +0000 (16:38 +0900)
commit4285e438dfe1fe808ebc896650fbe8123b20c117
treef1094e5c7fad751a68872038e825c3dcc3770d9a
parent6085dc2c1c1b678a6512565d351f926bfbdaf4a3
Bring back old array enumerator code (#88371)

This is a 0.3% size saving for Stage1. We not only allow array enumerators to be preinitialized again, but also avoid introducing many array `MethodTables` (looks like the new enumerators force array MethodTables for cases where we could have avoided them).

Fixes #82993.
src/coreclr/System.Private.CoreLib/src/System/Array.CoreCLR.cs
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Array.NativeAot.cs
src/libraries/System.Private.CoreLib/src/System/Array.Enumerators.cs
src/mono/System.Private.CoreLib/src/System/Array.Mono.cs