Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

AaronRobinsonMSFT
Copy link
Member

Convert GC function into QCall

Port CustomAttribute data parsing into C#.

@AaronRobinsonMSFT
Copy link
Member Author

/cc @jkotas

@lambdageek
Copy link
Member

How do you avoid chicken-and-egg problems? does this custom attribute parser get used when you are loading some class or JITing a method? What if there was [InlineArray] data in RuntimeCustomAttributeData.cs that the parser itself depended on, for example?

@AaronRobinsonMSFT
Copy link
Member Author

AaronRobinsonMSFT commented Jan 24, 2024

@lambdageek I didn't remove the parser itself, just the infrastructure around calling the native parser from managed code. This was very old code and the process was rather complicated.

  1. Partially populate, using Reflection, managed types with details for the signature parsing
  2. Pass those managed types down into native via an FCall
  3. Convert the data in the managed types into the native types
  4. Parsing the signature blob using the details in the native types
  5. Place the data from the native types into the managed types
  6. Move back into managed code and lazily convert the raw details into public surface types

This PR simply collapses 2 - 5 and does it all in C#.

The managed Utf8 decoder produces slightly different errors characters
Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@AaronRobinsonMSFT AaronRobinsonMSFT merged commit 0d81a5a into dotnet:main Jan 26, 2024
@AaronRobinsonMSFT AaronRobinsonMSFT deleted the remove_helper_frames branch January 26, 2024 03:02
@github-actions github-actions bot locked and limited conversation to collaborators Feb 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants