-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[Proposal] System.Runtime.CompilerServices.RuntimeFeature.UnmanagedCallKind
#38135
Comments
Would it make sense to attach this feature to the presence of |
If we decide to go ahead with this, the name should be synchronized with the name from #38133, e.g. |
I agree with @jkotas. |
This would require any runtime that supports the new |
Well, it seems inconsistent to me. The fact that the runtime is implementing
Exactly. It's not necessarily bad, but it feels odd to require these to be tied together when it's a very simple and small API addition to not do so. |
Updated. |
I believe that there are number of feature bundles that can be more fine grained in theory, but are not for simplicity - to avoid dealing with the theoretical combinations that you have one, but not the other. For example, static methods on interfaces are tied together with default implementations of interfaces, even though they are fairly independent features. In fact, static methods on interfaces were supported by the runtime since forever, and default implementations of interfaces were added just recently. |
If that's the litmus test, should we reconsider |
namespace System.Runtime.CompilerServices
{
public static partial class RuntimeFeature
{
public const string UnmanagedSignatureCallingConvention = nameof(UnmanagedSignatureCallingConvention);
}
} |
Background and Motivation
With .NET 5, we're going to be adding support for a new
CallKind
bit (tracked here: #38133). From the compiler side, we need a feature flag to know when the target platform supports that bit, so we can error in cases when it's not supported (like we do with DIMs).Proposed API
Usage Examples
In the C# compiler for determining errors.
Alternative Designs
N/A
Risks
N/A
The text was updated successfully, but these errors were encountered: