diff options
author | Michal Strehovský <MichalStrehovsky@users.noreply.github.com> | 2017-04-12 23:52:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-12 23:52:01 +0300 |
commit | da332710edc5387a79e298aa97f21e1feac56ceb (patch) | |
tree | 037cc5270e27559351696b29e37e738427a90fea /src/ILCompiler.TypeSystem | |
parent | 1860d048f1c85659bbec473b94bc03f2c72510e7 (diff) |
Add support for sorting MethodDescs (#3305)
Follows the same divide and conquer pattern as the code to sort
TypeDescs (#3258 - compare between classes using `ClassCode` and have
the classes handle comparions within the class).
Diffstat (limited to 'src/ILCompiler.TypeSystem')
-rw-r--r-- | src/ILCompiler.TypeSystem/src/ILCompiler.TypeSystem.csproj | 27 | ||||
-rw-r--r-- | src/ILCompiler.TypeSystem/tests/SyntheticVirtualOverrideTests.cs | 13 |
2 files changed, 40 insertions, 0 deletions
diff --git a/src/ILCompiler.TypeSystem/src/ILCompiler.TypeSystem.csproj b/src/ILCompiler.TypeSystem/src/ILCompiler.TypeSystem.csproj index 6a249a04a..b9c331b24 100644 --- a/src/ILCompiler.TypeSystem/src/ILCompiler.TypeSystem.csproj +++ b/src/ILCompiler.TypeSystem/src/ILCompiler.TypeSystem.csproj @@ -263,6 +263,9 @@ <Compile Include="..\..\Common\src\TypeSystem\Ecma\EcmaGenericParameter.Sorting.cs"> <Link>Ecma\EcmaGenericParameter.Sorting.cs</Link> </Compile> + <Compile Include="..\..\Common\src\TypeSystem\Ecma\EcmaMethod.Sorting.cs"> + <Link>Ecma\EcmaMethod.Sorting.cs</Link> + </Compile> <Compile Include="..\..\Common\src\TypeSystem\Ecma\EcmaModule.Sorting.cs"> <Link>Ecma\EcmaModule.Sorting.cs</Link> </Compile> @@ -320,9 +323,24 @@ <Compile Include="..\..\Common\src\TypeSystem\IL\DelegateInfo.cs"> <Link>IL\DelegateInfo.cs</Link> </Compile> + <Compile Include="..\..\Common\src\TypeSystem\IL\Stubs\DelegateMarshallingMethodThunk.Sorting.cs"> + <Link>IL\Stubs\DelegateMarshallingMethodThunk.Sorting.cs</Link> + </Compile> + <Compile Include="..\..\Common\src\TypeSystem\IL\Stubs\DelegateThunks.Sorting.cs"> + <Link>IL\Stubs\DelegateThunks.Sorting.cs</Link> + </Compile> <Compile Include="..\..\Common\src\TypeSystem\IL\Stubs\EnumThunks.cs"> <Link>IL\Stubs\EnumThunks.cs</Link> </Compile> + <Compile Include="..\..\Common\src\TypeSystem\IL\Stubs\EnumThunks.Sorting.cs"> + <Link>IL\Stubs\EnumThunks.Sorting.cs</Link> + </Compile> + <Compile Include="..\..\Common\src\TypeSystem\IL\Stubs\PInvokeTargetNativeMethod.Sorting.cs"> + <Link>IL\Stubs\PInvokeTargetNativeMethod.Sorting.cs</Link> + </Compile> + <Compile Include="..\..\Common\src\TypeSystem\IL\Stubs\StructMarshallingThunk.Sorting.cs"> + <Link>IL\Stubs\StructMarshallingThunk.Sorting.cs</Link> + </Compile> <Compile Include="..\..\Common\src\TypeSystem\IL\TypeSystemContext.DelegateInfo.cs"> <Link>IL\TypeSystemContext.DelegateInfo.cs</Link> </Compile> @@ -401,6 +419,15 @@ <Compile Include="..\..\Common\src\TypeSystem\Interop\IL\NativeStructType.cs"> <Link>TypeSystem\Interop\IL\NativeStructType.cs</Link> </Compile> + <Compile Include="..\..\Common\src\TypeSystem\Sorting\InstantiatedMethod.Sorting.cs"> + <Link>TypeSystem\Sorting\InstantiatedMethod.Sorting.cs</Link> + </Compile> + <Compile Include="..\..\Common\src\TypeSystem\Sorting\MethodDesc.Sorting.cs"> + <Link>TypeSystem\Sorting\MethodDesc.Sorting.cs</Link> + </Compile> + <Compile Include="..\..\Common\src\TypeSystem\Sorting\MethodForInstantiatedType.Sorting.cs"> + <Link>TypeSystem\Sorting\MethodForInstantiatedType.Sorting.cs</Link> + </Compile> <Compile Include="TypeSystem\Interop\IL\NativeStructType.Mangling.cs"> <Link>TypeSystem\Interop\IL\NativeStructType.Mangling.cs</Link> </Compile> diff --git a/src/ILCompiler.TypeSystem/tests/SyntheticVirtualOverrideTests.cs b/src/ILCompiler.TypeSystem/tests/SyntheticVirtualOverrideTests.cs index c1c0b8a82..66c387bf3 100644 --- a/src/ILCompiler.TypeSystem/tests/SyntheticVirtualOverrideTests.cs +++ b/src/ILCompiler.TypeSystem/tests/SyntheticVirtualOverrideTests.cs @@ -169,6 +169,19 @@ namespace TypeSystemTests _name = name; } + protected override int ClassCode + { + get + { + throw new NotImplementedException(); + } + } + + protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) + { + throw new NotImplementedException(); + } + public override bool IsVirtual { get |