-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Only root infrastructure and dependencies for IDynamicInterfaceCastable when IDIC is implemented #116660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jkoritzinsky
merged 20 commits into
dotnet:main
from
jkoritzinsky:idic-conditional-rooting
Jul 2, 2025
Merged
Only root infrastructure and dependencies for IDynamicInterfaceCastable when IDIC is implemented #116660
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
ff4ace5
Implement support for weak symbols in ILC
jkoritzinsky 7b35d82
Initial sketch of conditionally rooting IDIC when IDIC is actually used.
jkoritzinsky 27a0fae
Manually use weak symbols in the bootstrapper to handle weak IDIC
jkoritzinsky c03f3b2
Remove SymbolFlags now that we're using a bootstrapper-based weak sym…
jkoritzinsky 465e703
Only ask for maximally constructable interface types for casting if I…
jkoritzinsky d88c99e
Remove Weak field on RuntimeExportAttribute
jkoritzinsky 5815948
Reduce diff
jkoritzinsky fe157a2
Make IDynamicCastableSupport trimmable
AustinWise 4e7b795
Make the IDIC static constructor check live elsewhere
jkoritzinsky ff74f16
Remove slots and fix C99 _Pragma usage
jkoritzinsky 7856559
Merge branch 'main' of https://github.com/dotnet/runtime into idic-co…
jkoritzinsky 465ec2b
Downgrade interface type symbols in interface dispatch stubs
jkoritzinsky 8ac6d6e
Substitute away the code we can't trim out easily
jkoritzinsky 7d2a548
Scan the "feature body removed" helper always. We might remove featur…
jkoritzinsky 515b35c
Look for constructed implementing type instead of IDIC itself.
jkoritzinsky 68b40fb
Fix substitution condition
jkoritzinsky 7635ea4
Merge branch 'main' of https://github.com/dotnet/runtime into idic-co…
jkoritzinsky ec645e4
Add ThrowFeatureBodyRemoved helper to Test.CoreLib
jkoritzinsky 1b19031
Remove leftovers from previous impl
jkoritzinsky 993d1e8
PR feedback
jkoritzinsky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
src/coreclr/nativeaot/Test.CoreLib/src/Internal/Runtime/IDynamicInterfaceCastableSupport.cs
This file was deleted.
Oops, something went wrong.
48 changes: 48 additions & 0 deletions
48
src/coreclr/nativeaot/Test.CoreLib/src/System/Runtime/CompilerServices/RuntimeFeature.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| namespace System.Runtime.CompilerServices | ||
| { | ||
| public static partial class RuntimeFeature | ||
| { | ||
| /// <summary> | ||
| /// Name of the Portable PDB feature. | ||
| /// </summary> | ||
| public const string PortablePdb = nameof(PortablePdb); | ||
|
|
||
| /// <summary> | ||
| /// Indicates that this version of runtime supports default interface method implementations. | ||
| /// </summary> | ||
| public const string DefaultImplementationsOfInterfaces = nameof(DefaultImplementationsOfInterfaces); | ||
|
|
||
| /// <summary> | ||
| /// Indicates that this version of runtime supports the Unmanaged calling convention value. | ||
| /// </summary> | ||
| public const string UnmanagedSignatureCallingConvention = nameof(UnmanagedSignatureCallingConvention); | ||
|
|
||
| /// <summary> | ||
| /// Indicates that this version of runtime supports covariant returns in overrides of methods declared in classes. | ||
| /// </summary> | ||
| public const string CovariantReturnsOfClasses = nameof(CovariantReturnsOfClasses); | ||
|
|
||
| /// <summary> | ||
| /// Represents a runtime feature where types can define ref fields. | ||
| /// </summary> | ||
| public const string ByRefFields = nameof(ByRefFields); | ||
|
|
||
| /// <summary> | ||
| /// Represents a runtime feature where byref-like types can be used in Generic parameters. | ||
| /// </summary> | ||
| public const string ByRefLikeGenerics = nameof(ByRefLikeGenerics); | ||
|
|
||
| /// <summary> | ||
| /// Indicates that this version of runtime supports virtual static members of interfaces. | ||
| /// </summary> | ||
| public const string VirtualStaticsInInterfaces = nameof(VirtualStaticsInInterfaces); | ||
|
|
||
| /// <summary> | ||
| /// Indicates that this version of runtime supports <see cref="System.IntPtr" /> and <see cref="System.UIntPtr" /> as numeric types. | ||
| /// </summary> | ||
| public const string NumericIntPtr = nameof(NumericIntPtr); | ||
| } | ||
| } |
16 changes: 16 additions & 0 deletions
16
...lr/nativeaot/Test.CoreLib/src/System/Runtime/InteropServices/IDynamicInterfaceCastable.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using Internal.Runtime; | ||
|
|
||
| namespace System.Runtime.InteropServices | ||
| { | ||
| public unsafe partial interface IDynamicInterfaceCastable | ||
| { | ||
| internal static IntPtr GetDynamicInterfaceImplementation(object instance, MethodTable* interfaceType, ushort slot) | ||
| { | ||
| RuntimeImports.RhpFallbackFailFast(); | ||
| return default; | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.