Skip to content
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

Implement support for UnsafeAccessor in the trimmer #88268

Merged
merged 53 commits into from
Jul 18, 2023
Merged
Changes from 27 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
200b988
First
vitek-karas Jun 14, 2023
bc3dac0
Methods
vitek-karas Jun 15, 2023
3983540
Refactoring and true method resolution
vitek-karas Jun 15, 2023
aa8b53a
Progress
vitek-karas Jun 16, 2023
27d4674
More tests
vitek-karas Jun 19, 2023
7725027
Tests
vitek-karas Jun 20, 2023
7bede4d
Tests
vitek-karas Jun 21, 2023
c83be6f
More
vitek-karas Jun 23, 2023
2e62970
Fixups after a recent fix in CoreCLR implementation
vitek-karas Jun 23, 2023
b7e1484
Revert to method group marking
vitek-karas Jun 26, 2023
b4fea74
Resolve inhertiance behavior inconsistencies
vitek-karas Jun 26, 2023
95f32b2
Simplify the code
vitek-karas Jun 26, 2023
8f2f52e
Add support for fields
vitek-karas Jun 26, 2023
686528a
Methods on value types
vitek-karas Jun 29, 2023
6f1ee84
Fields on value types
vitek-karas Jun 29, 2023
ca883bc
Requires tests
vitek-karas Jun 29, 2023
c7aaabc
DAM and UnsafeAccessor tests
vitek-karas Jun 30, 2023
93b53a3
Formatting
vitek-karas Jun 30, 2023
9fd8178
Formatting
vitek-karas Jun 30, 2023
e886374
Update src/coreclr/tools/Common/TypeSystem/IL/UnsafeAccessors.cs
vitek-karas Jun 30, 2023
c623196
Linker tests use both XUnit and VSTest format
agocke Jun 30, 2023
0b023e0
Add enablePublishTestResults
agocke Jun 30, 2023
820f14c
Fix API compat - hide the redefined BCL type
vitek-karas Jul 10, 2023
0738762
Exclude the new tests on mono
vitek-karas Jul 11, 2023
b70becc
First
vitek-karas Jun 14, 2023
cb6f71f
Methods
vitek-karas Jun 15, 2023
6638a05
Refactoring and true method resolution
vitek-karas Jun 15, 2023
75974af
Progress
vitek-karas Jun 16, 2023
6722a03
More tests
vitek-karas Jun 19, 2023
6376210
Tests
vitek-karas Jun 20, 2023
6e439de
Tests
vitek-karas Jun 21, 2023
a0b2295
More
vitek-karas Jun 23, 2023
43726d7
Fixups after a recent fix in CoreCLR implementation
vitek-karas Jun 23, 2023
74a5ee5
Revert to method group marking
vitek-karas Jun 26, 2023
47d82d0
Resolve inhertiance behavior inconsistencies
vitek-karas Jun 26, 2023
74d57c0
Simplify the code
vitek-karas Jun 26, 2023
4f945d4
Add support for fields
vitek-karas Jun 26, 2023
13972ca
Methods on value types
vitek-karas Jun 29, 2023
4ffa95d
Fields on value types
vitek-karas Jun 29, 2023
e9fcb68
Requires tests
vitek-karas Jun 29, 2023
ce9376b
DAM and UnsafeAccessor tests
vitek-karas Jun 30, 2023
f2c595a
Formatting
vitek-karas Jun 30, 2023
50a219a
Formatting
vitek-karas Jun 30, 2023
623a2f0
Update src/coreclr/tools/Common/TypeSystem/IL/UnsafeAccessors.cs
vitek-karas Jun 30, 2023
906ccb9
Linker tests use both XUnit and VSTest format
agocke Jun 30, 2023
7dbca19
Add enablePublishTestResults
agocke Jun 30, 2023
45cd27a
Fix API compat - hide the redefined BCL type
vitek-karas Jul 10, 2023
58741fb
Exclude the new tests on mono
vitek-karas Jul 11, 2023
344037f
Merge branch 'main' into TrimmerUnsafeAccessor
lambdageek Jul 17, 2023
ec66190
[mono] uncomment passing tests
lambdageek Jul 14, 2023
22023ed
Merge branch 'TrimmerUnsafeAccessor' of https://github.com/vitek-kara…
vitek-karas Jul 17, 2023
9d5e30f
Fixes after merge with main
vitek-karas Jul 17, 2023
b238760
Update src/tools/illink/src/linker/Linker.Steps/UnsafeAccessorMarker.cs
vitek-karas Jul 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,6 @@ class InheritanceDerived : InheritanceBase
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/86040", TestRuntimes.Mono)]
public static void Verify_InheritanceMethodResolution()
{
Console.WriteLine($"Running {nameof(Verify_InheritanceMethodResolution)}");
Expand All @@ -403,7 +402,6 @@ public static void Verify_InheritanceMethodResolution()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/86040", TestRuntimes.Mono)]
public static void Verify_InheritanceFieldResolution()
{
Console.WriteLine($"Running {nameof(Verify_InheritanceFieldResolution)}");
Expand Down Expand Up @@ -453,6 +451,9 @@ public static void Verify_InvalidTargetUnsafeAccessor()
AssertExtensions.ThrowsMissingMemberException<MissingMethodException>(
isNativeAot ? null : UserDataClass.MethodPointerName,
() => CallPointerMethod(null, null));
AssertExtensions.ThrowsMissingMemberException<MissingMethodException>(
isNativeAot ? null : UserDataClass.StaticMethodName,
() => { string sr = string.Empty; StaticMethodWithDifferentReturnType(null, null, ref sr, string.Empty); });

Assert.Throws<AmbiguousMatchException>(
() => CallAmbiguousMethod(CallPrivateConstructorClass(), null));
Expand Down Expand Up @@ -483,6 +484,8 @@ public static void Verify_InvalidTargetUnsafeAccessor()
[UnsafeAccessor(UnsafeAccessorKind.StaticMethod, Name=UserDataClass.MethodPointerName)]
extern static string CallPointerMethod(UserDataClass d, delegate* unmanaged[Stdcall]<void> fptr);

[UnsafeAccessor(UnsafeAccessorKind.StaticMethod, Name=UserDataClass.StaticMethodName)]
extern static int StaticMethodWithDifferentReturnType(UserDataClass d, string s, ref string sr, in string si);
}

[Fact]
Expand Down