-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NativeAOT] Reflection Invoke refactoring (#73131)
- Refactored reflection Invoke in NativeAOT to be similar to how it is done in CoreCLR. - All argument validation and coercion is done via static code now. This makes the reflection invoke stubs much smaller and the AOT compiler side a lot simpler. - The invoke stub is minimal now and just takes the arguments for the methods to invoke as "Span of byrefs". The two notable differences with CoreCLR are: - The invoke stub takes the function pointer to call as an argument to allow sharing of the stubs between methods with the same signature. CoreCLR has the thunks non-sharable currently. We have discussed sharing them among methods with the same signature like it is done here. - The return value is returned as byref. CoreCLR thunk does boxing of the return value as part of the stub. Again, we have discussed to do it this way in CoreCLR too, we just did not have time to do it yet. Fixes #72548 Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
- Loading branch information
1 parent
c4bb28f
commit f348338
Showing
43 changed files
with
870 additions
and
1,674 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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 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.