-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Update auto-generated native AOT metadata wrappers to use readonly structs #101895
Conversation
structs This avoids defensive copies when these types are used for readonly fields Also deleted some unused methods and unused arguments, and make the auto-generated code more compact.
As observed in #101890 (comment). The crash during defensive copy of 100 byte struct. |
@@ -88,7 +88,7 @@ public sealed override MethodInfo EntryPoint | |||
MetadataReader reader = scope.Reader; | |||
|
|||
QualifiedMethodHandle entrypointHandle = scope.ScopeDefinition.EntryPoint; | |||
if (!entrypointHandle.IsNull(reader)) | |||
if (!entrypointHandle.IsNil) |
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.
IsNil
matches the naming convention and shape of System.Reflection.Metadata.
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.
Nice, thanks!
/azp run runtime-nativeaot-outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
…ructs (dotnet#101895) This avoids defensive copies when these types are used for readonly fields Also deleted some unused methods and unused arguments, and make the auto-generated code more compact.
…ructs (dotnet#101895) This avoids defensive copies when these types are used for readonly fields Also deleted some unused methods and unused arguments, and make the auto-generated code more compact.
This avoids defensive copies when these types are used for readonly fields
Also deleted some unused methods and unused arguments, and make the auto-generated code more compact.