-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert exception throwing JIT helpers to managed code. (#105671)
* Change JIT helper definition macro to encode BinderMethodID. Remove CorInfoHelpSig and replace with BinderMethodID in macros. Convert start up loading of managed JIT helpers to lazy model. * Remove the early start-up registration of managed JIT helpers. * Narrowly permit type loading in SPCL during eager fixup for R2R images.
- Loading branch information
1 parent
280f2a0
commit 30b34e6
Showing
23 changed files
with
500 additions
and
651 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
38 changes: 38 additions & 0 deletions
38
src/coreclr/System.Private.CoreLib/src/System/ThrowHelper.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System.Diagnostics.CodeAnalysis; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
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 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.