diff options
author | Michal Strehovsky <michals@microsoft.com> | 2018-07-23 10:23:45 +0300 |
---|---|---|
committer | Michal Strehovsky <michals@microsoft.com> | 2018-07-23 10:23:45 +0300 |
commit | 045a28051c6b85b82fe42e944fcb2267768ebbe2 (patch) | |
tree | 007e9d069f087ef48bb6270ccc710a555cef7d1a /src/Test.CoreLib | |
parent | 67ea31d51ad529912b00ad8bc7a29aa9621413db (diff) |
Make generic composition details relative addresses
I'm looking at size regressions between .NET Native 1.7 and the current mainline branch. A thing that stood out is universally bigger EETypes. A contributor to this was getting rid of GenericInstanceDescs between 1.7 and 2.0 and replacing them by direct references to generic composition details from the EEType. Size-wise, this was mostly a wash, but we can actually do better - these new fields are not critical to be pointer-sized.
This change turns them into relative pointers. This saves 33 kB on a hello world app. I expect around 100 kB savings on the UWP People app based on my back-of-the-envelope calculation.
Project N baggage:
1. Update pntestcl build configuration to compile it with a C# compiler that is not 8 years old
2. Disable metadata validation transform on class libraries. This is hitting what appears to be a CCI metadata validator bug (Validator.cs:796) where it thinks a modified type should have the same interned key as the unmodified version of it. The act of resolving a modified type strips off the modifier. This ticks off the validator.
3. Fix a Reducer bug where it wasn't marking non-interface constraints as necessary. The C# unmanaged constraint is expressed as [modreq UnmanagedType] ValueType. We were not marking UnmanagedType as necessary.
4. Update checked in binder because this is a file format change
[tfs-changeset: 1708263]
Diffstat (limited to 'src/Test.CoreLib')
-rw-r--r-- | src/Test.CoreLib/src/Test.CoreLib.csproj | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Test.CoreLib/src/Test.CoreLib.csproj b/src/Test.CoreLib/src/Test.CoreLib.csproj index 685a4fd63..2ae214276 100644 --- a/src/Test.CoreLib/src/Test.CoreLib.csproj +++ b/src/Test.CoreLib/src/Test.CoreLib.csproj @@ -75,6 +75,9 @@ <Compile Include="..\..\Runtime.Base\src\System\Runtime\InteropServices\UnsafeGCHandle.cs"> <Link>Runtime.Base\src\System\Runtime\InteropServices\UnsafeGCHandle.cs</Link> </Compile> + <Compile Include="..\..\Runtime.Base\src\System\Runtime\InteropServices\UnmanagedType.cs"> + <Link>Runtime.Base\src\System\Runtime\InteropServices\UnmanagedType.cs</Link> + </Compile> <Compile Include="..\..\Runtime.Base\src\RhBaseName.cs"> <Link>Runtime.Base\src\RhBaseName.cs</Link> </Compile> |