Fewer ilstubs in corelib from reflection apis (dotnet/coreclr#24708)
commit30fb72969edf4d0f8cf3bc82c4f5a6c03f2b6f27
authorDavid Wrighton <davidwr@microsoft.com>
Thu, 23 May 2019 23:18:07 +0000 (23 16:18 -0700)
committerMarek Safar <marek.safar@gmail.com>
Fri, 24 May 2019 08:00:05 +0000 (24 10:00 +0200)
treee0bcd0948001ac3eecb4650248977557d1578347
parent50fac547417afafddf2febdbe489705dacb5501c
Fewer ilstubs in corelib from reflection apis (dotnet/coreclr#24708)

Rework use of marshalling for RuntimeTypeHandle, RuntimeModule, RuntimeAssembly, and IRuntimeMethodInfo as used by QCalls
- Remove special QCall only used marshallers for RuntimeAssembly, RuntimeModule and IRuntimeMethodInfo
- Following the pattern of ObjectHandleOnStack, implement QCall handle types for RuntimeAssembly/Module/TypeHandle. Use these in all QCalls that once passed the types directly.
- For uses of IRuntimeMethodInfo, follow the existing RuntimeMethodHandleInternal pattern

Also perform some replacement of bool marshalling with use of Interop.BOOL, and a few cases of using pointers instead of byref arguments.

Fix delivers a relatively small win on startup, and small throughput gains around reflection as IL stubs are no longer necessary for many functions in reflection that once needed them.

Reduces methods jitted on powershell startup from 422 to 399, (About 5%) but performance win is only about 5ms on ~400ms as the methods removed are simple.

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
netcore/System.Private.CoreLib/shared/Interop/Windows/Kernel32/Interop.Globalization.cs
netcore/System.Private.CoreLib/shared/System/Globalization/CultureInfo.Windows.cs