- Notifications
You must be signed in to change notification settings - Fork5.2k
Convert a few reflection FCalls to C##92512
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ghost commentedSep 23, 2023
Tagging subscribers to this area: @dotnet/area-system-reflection Issue Detailsnull
|
| namespaceSystem | ||
| { | ||
| // | ||
| // This file contains methods on Type that are internal to the framework. |
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.
This historic split does not make sense anymore.
Wraith2 commentedSep 23, 2023
The name |
jkotas commentedSep 23, 2023
More self-descripting name would be |
| TypeHandleth=GetNativeTypeHandle(); | ||
| boolisInterface=!th.IsTypeDesc&&th.AsMethodTable()->IsInterface; | ||
| GC.KeepAlive(this); |
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 wonder if JIT is allowed to foldtypeof(T).IsInterface without intrinsics at all - the RuntimeType object is on the NonGC heap,GetNativeTypeHandle() is basically MethodTable which is mostly immutable 🙂 so in theory jit could fold->m_handle->field
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.
Yeah, it would be possible in theory. I am not sure whether it would make things simpler overall.
No description provided.