-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Convert exception throwing JIT helpers to managed code. #105671
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
Merged
AaronRobinsonMSFT
merged 13 commits into
dotnet:main
from
AaronRobinsonMSFT:hmf_jithelper_throws
Aug 2, 2024
Merged
Changes from 2 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
d52fbaa
Remove HelperMethodFrames from jithelpers
AaronRobinsonMSFT 1c2c754
Merge remote-tracking branch 'upstream/main' into hmf_jithelper_throws
AaronRobinsonMSFT 49dc22b
Clean-up
AaronRobinsonMSFT 1b75776
Review feedback
AaronRobinsonMSFT f06a358
Change JIT helper definition macro to encode BinderMethodID.
AaronRobinsonMSFT 63fe345
Remove the early start-up registration of managed JIT helpers.
AaronRobinsonMSFT a760861
Narrowly permit type loading in SPCL during eager fixup for R2R images.
AaronRobinsonMSFT 1d9c5ba
Feedback
AaronRobinsonMSFT e606d7a
Match casing and style of new THROWHELPER type to CASTHELPERS
AaronRobinsonMSFT e11de32
Fix-up thread mode. This is a temporary fix.
AaronRobinsonMSFT 03d928b
Change thread mode contract to expected.
AaronRobinsonMSFT 6375346
Attempt to narrow contracts
AaronRobinsonMSFT 9fb0a61
Merge branch 'main' into hmf_jithelper_throws
AaronRobinsonMSFT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
48 changes: 48 additions & 0 deletions
48
src/coreclr/System.Private.CoreLib/src/System/ThrowHelper.cs
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using System.Buffers; | ||
| using System.Collections.Generic; | ||
| using System.Diagnostics; | ||
| using System.Diagnostics.CodeAnalysis; | ||
| using System.IO; | ||
| using System.Numerics; | ||
| using System.Reflection; | ||
| using System.Runtime; | ||
| using System.Runtime.CompilerServices; | ||
| using System.Runtime.InteropServices; | ||
| using System.Runtime.Intrinsics; | ||
| using System.Runtime.Serialization; | ||
| using System.Threading; | ||
|
|
||
| namespace System | ||
| { | ||
| internal static unsafe partial class ThrowHelper | ||
| { | ||
| [DoesNotReturn] | ||
| [LibraryImport(RuntimeHelpers.QCall, EntryPoint = "ExceptionNative_ThrowAmbiguousResolutionException")] | ||
| private static partial void ThrowAmbiguousResolutionException(MethodTable* targetType, MethodTable* interfaceType, void* methodDesc); | ||
|
|
||
| [DoesNotReturn] | ||
| internal static void ThrowAmbiguousResolutionException( | ||
| void* method, // MethodDesc* | ||
| void* interfaceType, // MethodTable* | ||
| void* targetType) // MethodTable* | ||
| { | ||
| ThrowAmbiguousResolutionException((MethodTable*)targetType, (MethodTable*)interfaceType, method); | ||
| } | ||
|
|
||
| [DoesNotReturn] | ||
| [LibraryImport(RuntimeHelpers.QCall, EntryPoint = "ExceptionNative_ThrowEntryPointNotFoundException")] | ||
| private static partial void ThrowEntryPointNotFoundException(MethodTable* targetType, MethodTable* interfaceType, void* methodDesc); | ||
|
|
||
| [DoesNotReturn] | ||
| internal static void ThrowEntryPointNotFoundException( | ||
| void* method, // MethodDesc* | ||
| void* interfaceType, // MethodTable* | ||
| void* targetType) // MethodTable* | ||
| { | ||
| ThrowEntryPointNotFoundException((MethodTable*)targetType, (MethodTable*)interfaceType, method); | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.