-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[hot_reload] implement param reflection #77563
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
Merged
Changes from 4 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
fa0fbba
Add new test ReflectionAddNewMethod
lambdageek 0458e6a
FIXME: get_param_names, get_marshal_info and custom_attrs need work
lambdageek bbb5670
WIP - add a method param reverse lookup
lambdageek c96dec0
look up params from added methods
lambdageek fe55b74
Remove FIXMEs and unused field
lambdageek 0dcfca6
remove writelines from test
lambdageek 55b2892
fix test on coreclr
lambdageek b71efae
why does coreclr have 2 attributes here??
lambdageek d078831
There should be 2 attributes on the 4th param
lambdageek b1829fb
one more place that looks at params
lambdageek 9d923b2
A couple more places where we look at the Params table
lambdageek 7f89576
Check default values on params on added method
lambdageek ca45fd4
fix lookup if table is empty
lambdageek ded76bb
add a gratuitious typeof assert
lambdageek 42e43e5
Add a single mono_metadata_get_method_params function
lambdageek 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
16 changes: 16 additions & 0 deletions
16
...tem.Reflection.Metadata.ApplyUpdate.Test.ReflectionAddNewMethod/ReflectionAddNewMethod.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,16 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| using System; | ||
|
|
||
|
|
||
| namespace System.Reflection.Metadata.ApplyUpdate.Test | ||
| { | ||
| public class ReflectionAddNewMethod | ||
| { | ||
| public string ExistingMethod(string u, double f) | ||
| { | ||
| return u + f.ToString();; | ||
| } | ||
|
|
||
| } | ||
| } |
21 changes: 21 additions & 0 deletions
21
....Reflection.Metadata.ApplyUpdate.Test.ReflectionAddNewMethod/ReflectionAddNewMethod_v1.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; | ||
| using System.Runtime.CompilerServices; | ||
| using CancellationToken = System.Threading.CancellationToken; | ||
|
|
||
| namespace System.Reflection.Metadata.ApplyUpdate.Test | ||
| { | ||
| public class ReflectionAddNewMethod | ||
| { | ||
| public string ExistingMethod(string u, double f) | ||
| { | ||
| return u + f.ToString();; | ||
| } | ||
|
|
||
| public double AddedNewMethod(char c, float h, string w, CancellationToken ct = default, [CallerMemberName] string callerName = "") | ||
| { | ||
| return ((double)Convert.ToInt32(c)) + h; | ||
| } | ||
| } | ||
| } |
11 changes: 11 additions & 0 deletions
11
...ionAddNewMethod/System.Reflection.Metadata.ApplyUpdate.Test.ReflectionAddNewMethod.csproj
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,11 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <RootNamespace>System.Runtime.Loader.Tests</RootNamespace> | ||
| <TargetFramework>$(NetCoreAppCurrent)</TargetFramework> | ||
| <TestRuntime>true</TestRuntime> | ||
| <DeltaScript>deltascript.json</DeltaScript> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <Compile Include="ReflectionAddNewMethod.cs" /> | ||
| </ItemGroup> | ||
| </Project> |
6 changes: 6 additions & 0 deletions
6
...pdate/System.Reflection.Metadata.ApplyUpdate.Test.ReflectionAddNewMethod/deltascript.json
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,6 @@ | ||
| { | ||
| "changes": [ | ||
| {"document": "ReflectionAddNewMethod.cs", "update": "ReflectionAddNewMethod_v1.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
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.