[ILLink] Mark recursive interface implementations in MarkStep#99922
[ILLink] Mark recursive interface implementations in MarkStep#99922jtschuster merged 8 commits intodotnet:mainfrom
Conversation
- ILVerify will fail due to members not being kept, so to make the errors more informative, run kept member validation first, then ILVerify
|
The only test diff compared with #99566 comes in MultipleDimsProvidedByRecursiveInterface.cs: @@ -16,14 +16,16 @@ namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods
[KeptMemberInAssembly ("library.dll", typeof(Program.I0), "Method()")]
[KeptTypeInAssembly ("library.dll", typeof(Program.I00))]
[KeptMemberInAssembly ("library.dll", typeof(Program.I00), "Program.I0.Method()")]
- [KeptMemberInAssembly ("library.dll", typeof(Program.I01), "Program.I0.Method()")]
+ // Bug: DIM resolution doesn't look at recursive interfaces
+ //[KeptMemberInAssembly ("library.dll", typeof(Program.I01), "Program.I0.Method()")]
[KeptInterfaceOnTypeInAssembly ("library.dll", typeof (Program.I00), "library.dll", typeof (Program.I0))]
[KeptInterfaceOnTypeInAssembly ("library.dll", typeof (Program.MyFoo), "library.dll", typeof (Program.I000))]
[KeptTypeInAssembly ("library.dll", typeof(Program.I000))]
[KeptInterfaceOnTypeInAssembly ("library.dll", typeof (Program.I000), "library.dll", typeof (Program.I00))]
- [KeptInterfaceOnTypeInAssembly ("library.dll", typeof (Program.MyFoo), "library.dll", typeof (Program.I010))]
- [KeptInterfaceOnTypeInAssembly ("library.dll", typeof (Program.I010), "library.dll", typeof (Program.I01))]
- [KeptInterfaceOnTypeInAssembly ("library.dll", typeof (Program.I01), "library.dll", typeof (Program.I0))]
+ // Bug: DIM resolution doesn't look at recursive interfaces
+ //[KeptInterfaceOnTypeInAssembly ("library.dll", typeof (Program.MyFoo), "library.dll", typeof (Program.I010))]
+ //[KeptInterfaceOnTypeInAssembly ("library.dll", typeof (Program.I010), "library.dll", typeof (Program.I01))]
+ //[KeptInterfaceOnTypeInAssembly ("library.dll", typeof (Program.I01), "library.dll", typeof (Program.I0))]
#endif
class MultipleDimsProvidedByRecursiveInterface
{ |
...s/illink/test/Mono.Linker.Tests.Cases/UnreachableBlock/CompilerGeneratedCodeSubstitutions.cs
Show resolved
Hide resolved
|
Do we need to update any other calls to |
Yeah, there are a few places, like interface method resolution, but they might be fairly significant changes, so should we separate them out into their own PRs? |
sbomer
left a comment
There was a problem hiding this comment.
Yeah, there are a few places, like interface method resolution, but they might be fairly significant changes, so should we separate them out into their own PRs?
That seems fine to me. The worst I would expect is that we miss marking some interfaces which we are already missing today.
Co-authored-by: Sven Boemer <[email protected]>
From #99566 (comment), splitting off a simpler change that doesn't cache the recursive interfaces and doesn't use the recursive interfaces in DIM finding. This does nearly double the time it takes to trim a hello world, whereas #99566 speeds it up slightly, so I'd be concerned about timeouts if this gets merged.