-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[mono] Turn methods with no instance access to static #43228
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
Conversation
|
Tagging subscribers to this area: @CoffeeFlux |
|
Are there any plans for a CoreCLR equivalent to this? Looking at things like |
src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.Mono.cs
Outdated
Show resolved
Hide resolved
src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.Mono.cs
Outdated
Show resolved
Hide resolved
src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.Mono.cs
Outdated
Show resolved
Hide resolved
src/mono/netcore/System.Private.CoreLib/src/System/RuntimeType.Mono.cs
Outdated
Show resolved
Hide resolved
| [MethodImplAttribute(MethodImplOptions.InternalCall)] | ||
| private extern void SetValueRelaxedImpl(object? value, int pos); | ||
|
|
||
| #pragma warning disable CA1822 |
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.
Why are these different? Is it just the volume and number of callers?
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.
They are accessed as instance calls from JIT
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.
Looks like InternalArray__ICollection_get_Count, InternalArray__IReadOnlyCollection_get_Count and few others which are accessing class members do not need the suppression.
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.
The intention is to indicate that none of the methods should be made static even if they could
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 think this comment is worth addressing, but otherwise looks good to me. Thanks!
No description provided.