Repository navigation
Add runtime support for ref fields
#63985
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
AaronRobinsonMSFT
merged 27 commits into
dotnet:main
from
AaronRobinsonMSFT:ref_field_support
Jan 23, 2022
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
4ae810d
Add runtime support for ref fields
AaronRobinsonMSFT 34933ac
Update Reflection.Emit tests to validate ref fields.
AaronRobinsonMSFT 6339127
Remove unnecessary addition in ASSERT.
AaronRobinsonMSFT 5fc6174
Mono should throw TypeLoadException for invalid ref field.
AaronRobinsonMSFT 2792c74
coreclr/
AaronRobinsonMSFT 7a2d818
libraries/
AaronRobinsonMSFT 4ff87f9
mono/
AaronRobinsonMSFT eafc0a8
tests/
AaronRobinsonMSFT acff92a
mono/
AaronRobinsonMSFT f2db03b
tests/
AaronRobinsonMSFT 091a48b
mono/
AaronRobinsonMSFT 78fbfd0
Merge remote-tracking branch 'upstream/main' into ref_field_support
AaronRobinsonMSFT a4604e6
mono/
AaronRobinsonMSFT f2ec70c
mono/
AaronRobinsonMSFT 3702e57
mono/
AaronRobinsonMSFT 87a3e30
mono/
AaronRobinsonMSFT 4fe2045
mono/
AaronRobinsonMSFT 66e7747
Add test for SRE activation of types with ref fields.
AaronRobinsonMSFT f493441
libraries/
AaronRobinsonMSFT 9804d2a
coreclr/
AaronRobinsonMSFT 166e4f2
Exclude the RefFields tests from running on llvmfullaot
AaronRobinsonMSFT e1b2c07
Merge branch 'main' into ref_field_support
AaronRobinsonMSFT d6e7c0f
Instead of dropping the byref, compute a token from a typespec.
AaronRobinsonMSFT 3059e77
mono/
AaronRobinsonMSFT 8dca52e
coreclr/
AaronRobinsonMSFT 6a5ac57
mono/
AaronRobinsonMSFT 62e06ed
mono/
AaronRobinsonMSFT 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
21 changes: 21 additions & 0 deletions
21
src/libraries/System.Reflection.Emit/tests/MethodBuilder/MethodBuilderByRefs.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,21 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using System.Linq; | ||
| using Xunit; | ||
|
|
||
| namespace System.Reflection.Emit.Tests | ||
| { | ||
| public class MethodBuilderByRefs | ||
| { | ||
| [Fact] | ||
| public void ByRef_Ldtoken() | ||
| { | ||
| TypeBuilder type = Helpers.DynamicType(TypeAttributes.Public); | ||
| MethodBuilder method = type.DefineMethod("TestMethod", MethodAttributes.Public, typeof(Type), Type.EmptyTypes); | ||
| ILGenerator ilg = method.GetILGenerator(); | ||
| ilg.Emit(OpCodes.Ldtoken, typeof(int).MakeByRefType()); | ||
| ilg.Emit(OpCodes.Ret); | ||
| } | ||
| } | ||
| } |
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
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.
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.