-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Mark DivRem with RequiresPreviewFeatures #82221
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,3 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids --> | ||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<Suppression> | ||
<DiagnosticId>CP0001</DiagnosticId> | ||
<Target>T:Internal.Console</Target> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0001</DiagnosticId> | ||
<Target>T:System.Runtime.CompilerServices.ICastable</Target> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>F:System.Resources.ResourceManager.BaseNameField</Target> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0002</DiagnosticId> | ||
<Target>F:System.Resources.ResourceSet.Reader</Target> | ||
</Suppression> | ||
<Suppression> | ||
<DiagnosticId>CP0014</DiagnosticId> | ||
<Target>M:System.Runtime.InteropServices.Marshal.CreateWrapperOfType(System.Object,System.Type)->object?:[T:System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute]</Target> | ||
</Suppression> | ||
</Suppressions> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5217,11 +5217,23 @@ public abstract partial class X86Base | |
internal X86Base() { } | ||
public static bool IsSupported { get { throw null; } } | ||
public static (int Eax, int Ebx, int Ecx, int Edx) CpuId(int functionId, int subFunctionId) { throw null; } | ||
[System.Runtime.Versioning.RequiresPreviewFeaturesAttribute("DivRem is in preview.")] | ||
public static (uint Quotient, uint Remainder) DivRem(uint lower, uint upper, uint divisor) { throw null; } | ||
[System.Runtime.Versioning.RequiresPreviewFeaturesAttribute("DivRem is in preview.")] | ||
public static (int Quotient, int Remainder) DivRem(uint lower, int upper, int divisor) { throw null; } | ||
[System.Runtime.Versioning.RequiresPreviewFeaturesAttribute("DivRem is in preview.")] | ||
public static (nuint Quotient, nuint Remainder) DivRem(nuint lower, nuint upper, nuint divisor) { throw null; } | ||
[System.Runtime.Versioning.RequiresPreviewFeaturesAttribute("DivRem is in preview.")] | ||
public static (nint Quotient, nint Remainder) DivRem(nuint lower, nint upper, nint divisor) { throw null; } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have these APIs gone through API review? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes: #27292 (comment) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The general premise of extending the intrinsics to support AFAIR, we covered at the time in API review that any other already approved but NYI APIs were also covered by that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The same general approval for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed, it's covered in the approval explicitly: #27292 (comment) |
||
public static void Pause() { throw null; } | ||
public abstract partial class X64 | ||
{ | ||
internal X64() { } | ||
public static bool IsSupported { get { throw null; } } | ||
[System.Runtime.Versioning.RequiresPreviewFeaturesAttribute("DivRem is in preview.")] | ||
public static (ulong Quotient, ulong Remainder) DivRem(ulong lower, ulong upper, ulong divisor) { throw null; } | ||
[System.Runtime.Versioning.RequiresPreviewFeaturesAttribute("DivRem is in preview.")] | ||
public static (long Quotient, long Remainder) DivRem(ulong lower, long upper, long divisor) { throw null; } | ||
} | ||
} | ||
|
||
|
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the plan that we ship these in .NET 8 as preview, or is the plan that by the time we ship .NET 8 it's fully supported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we plan to address it in .NET 8. Tracking issue #82194
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Technically every new API we add in previews is preview and doesn't require such attribution; this attribute was really intended to be used for things to remain in preview in supported releases. If we're just trying to scare people off from using it in previews, I guess it's ok, but it seems superfluous to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that this would be superfluous for ordinary APIs.
This is codegen intrinsic that may require non-trivial work to complete. Tagging it as preview makes us "ready to ship" without any additional changes, even in the case we do not have a chance to complete the work for some reason. Deleting the tag once the work is complete is a small clean change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough. Of course, we still need to remember to remove the attribute when we complete that additional work. Let's make sure to track that somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated #82194 to capture it.