-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Support symbol retargeting for function pointers. #43625
Conversation
Note that there was no PROTOTYPE comment associated with this, it had already been converted to a bullet in #39865 #Resolved |
@AlekseyTs @dotnet/roslyn-compiler for a review. |
src/Compilers/CSharp/Test/Symbol/Symbols/Retargeting/RetargetingTests.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/Symbol/Symbols/Retargeting/RetargetingTests.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/Symbol/Symbols/Retargeting/RetargetingTests.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/Symbol/Symbols/Retargeting/RetargetingTests.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/Symbol/Symbols/Retargeting/RetargetingTests.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/Symbol/Symbols/Retargeting/RetargetingTests.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Portable/Symbols/Retargeting/RetargetingSymbolTranslator.cs
Show resolved
Hide resolved
Done with review pass (iteration 1) #Closed |
@AlekseyTs addressed feedback. I totally rewrote the tests in RetargetingTests.cs (and that's the only change made), so I'd suggest not looking at the diff between iteration 1 and 2 and just reviewing RetargetingTests.cs from scratch as the diff is a bit messy. In reply to: 619274690 [](ancestors = 619274690) |
src/Compilers/CSharp/Test/Symbol/Symbols/Retargeting/RetargetingTests.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/Symbol/Symbols/Retargeting/RetargetingTests.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/Symbol/Symbols/Retargeting/RetargetingTests.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/Symbol/Symbols/Retargeting/RetargetingTests.cs
Show resolved
Hide resolved
@@ -750,6 +750,250 @@ class C1<T> | |||
Assert.Equal(c1.MangleName, c1r.MangleName); | |||
Assert.Equal(c1.MetadataName, c1r.MetadataName); | |||
} | |||
|
|||
[Fact] | |||
public void FunctionPointerRetargeting_FullyConsistent() |
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.
public [](start = 8, length = 6)
[CompilerTrait(CompilerFeature....)]
? And for other new tests #Resolved
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'll do this in a separate PR. I haven't added a CompilerFeature flag nor have I done this for any existing tests. I'd want to either do everything or nothing.
In reply to: 418119854 [](ancestors = 418119854)
Done with review pass (iteration 2) #Closed |
var retargeted2 = CreateCompilation(retargetedIdentity.WithVersion(new Version(2, 0, 0, 0)), new[] { retargetedSource }, references: standardReference); | ||
var retargeted2Ref = retargeted2.ToMetadataReference(); | ||
|
||
var consistent = CreateCompilation("public class C {}", assemblyName: "Con", targetFramework: TargetFramework.Standard); |
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.
Because I had to add an explicit StandardReference above (because that CreateCompilation overload does not add default references), I'm being explicit in the others rather than relying on any change to CreateCompilation to change for all of the calls.
@AlekseyTs addressed feedback. In reply to: 621949028 [](ancestors = 621949028) |
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.
LGTM (iteration 3)
@dotnet/roslyn-compiler for a second review. |
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.
Rebased on top of the latest master-merge |
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.
Auto-approval
@AlekseyTs @dotnet/roslyn-compiler for review.