Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/inc/corinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,11 @@ TODO: Talk about initializing strutures before use
#define SELECTANY extern __declspec(selectany)
#endif

SELECTANY const GUID JITEEVersionIdentifier = { /* b6af83a1-ca48-46c6-b7b0-5d7d6a79a5c5 */
0xb6af83a1,
0xca48,
0x46c6,
{0xb7, 0xb0, 0x5d, 0x7d, 0x6a, 0x79, 0xa5, 0xc5}
SELECTANY const GUID JITEEVersionIdentifier = { /* C4B63AD8-0D4D-4103-A928-A981B230F2C4 */
0xc4b63ad8,
0xd4d,
0x4103,
{ 0xa9, 0x28, 0xa9, 0x81, 0xb2, 0x30, 0xf2, 0xc4 }
};

//////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -643,6 +643,7 @@ enum CorInfoHelpFunc
CORINFO_HELP_THROW_ARGUMENTEXCEPTION, // throw ArgumentException
CORINFO_HELP_THROW_ARGUMENTOUTOFRANGEEXCEPTION, // throw ArgumentOutOfRangeException
CORINFO_HELP_THROW_PLATFORM_NOT_SUPPORTED, // throw PlatformNotSupportedException
CORINFO_HELP_THROW_ARGTYPE_NOT_SUPPORTED, // throw NotSupportedException

CORINFO_HELP_JIT_PINVOKE_BEGIN, // Transition to preemptive mode before a P/Invoke, frame is the first argument
CORINFO_HELP_JIT_PINVOKE_END, // Transition to cooperative mode after a P/Invoke, frame is the first argument
Expand Down
1 change: 1 addition & 0 deletions src/inc/jithelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@
JITHELPER(CORINFO_HELP_THROW_ARGUMENTEXCEPTION, JIT_ThrowArgumentException, CORINFO_HELP_SIG_REG_ONLY)
JITHELPER(CORINFO_HELP_THROW_ARGUMENTOUTOFRANGEEXCEPTION, JIT_ThrowArgumentOutOfRangeException, CORINFO_HELP_SIG_REG_ONLY)
JITHELPER(CORINFO_HELP_THROW_PLATFORM_NOT_SUPPORTED, JIT_ThrowPlatformNotSupportedException, CORINFO_HELP_SIG_REG_ONLY)
JITHELPER(CORINFO_HELP_THROW_ARGTYPE_NOT_SUPPORTED, JIT_ThrowArgTypeNotSupportedException, CORINFO_HELP_SIG_REG_ONLY)

JITHELPER(CORINFO_HELP_JIT_PINVOKE_BEGIN, NULL, CORINFO_HELP_SIG_UNDEF)
JITHELPER(CORINFO_HELP_JIT_PINVOKE_END, NULL, CORINFO_HELP_SIG_UNDEF)
Expand Down
3 changes: 2 additions & 1 deletion src/jit/flowgraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6843,7 +6843,8 @@ bool Compiler::fgIsThrow(GenTreePtr tree)
(tree->gtCall.gtCallMethHnd == eeFindHelper(CORINFO_HELP_THROWNULLREF)) ||
(tree->gtCall.gtCallMethHnd == eeFindHelper(CORINFO_HELP_THROW)) ||
(tree->gtCall.gtCallMethHnd == eeFindHelper(CORINFO_HELP_RETHROW)) ||
(tree->gtCall.gtCallMethHnd == eeFindHelper(CORINFO_HELP_THROW_PLATFORM_NOT_SUPPORTED)))
(tree->gtCall.gtCallMethHnd == eeFindHelper(CORINFO_HELP_THROW_PLATFORM_NOT_SUPPORTED)) ||
(tree->gtCall.gtCallMethHnd == eeFindHelper(CORINFO_HELP_THROW_ARGTYPE_NOT_SUPPORTED)))
{
noway_assert(tree->gtFlags & GTF_CALL);
noway_assert(tree->gtFlags & GTF_EXCEPT);
Expand Down
1 change: 1 addition & 0 deletions src/jit/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1477,6 +1477,7 @@ void HelperCallProperties::init()
case CORINFO_HELP_THROW_ARGUMENTEXCEPTION:
case CORINFO_HELP_THROW_ARGUMENTOUTOFRANGEEXCEPTION:
case CORINFO_HELP_THROW_PLATFORM_NOT_SUPPORTED:
case CORINFO_HELP_THROW_ARGTYPE_NOT_SUPPORTED:

break;

Expand Down
3 changes: 3 additions & 0 deletions src/mscorlib/Resources/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3697,4 +3697,7 @@
<data name="HashCode_EqualityNotSupported" xml:space="preserve">
<value>HashCode is a mutable struct and should not be compared with other HashCodes.</value>
</data>
<data name="Arg_TypeNotSupported" xml:space="preserve">
<value>Specified type is not supported</value>
</data>
</root>
18 changes: 18 additions & 0 deletions src/vm/jithelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5127,6 +5127,24 @@ HCIMPL0(void, JIT_ThrowPlatformNotSupportedException)
}
HCIMPLEND

/*********************************************************************/
HCIMPL0(void, JIT_ThrowArgTypeNotSupportedException)
{
FCALL_CONTRACT;

/* Make no assumptions about the current machine state */
ResetCurrentContext();

FC_GC_POLL_NOT_NEEDED(); // throws always open up for GC

HELPER_METHOD_FRAME_BEGIN_ATTRIB_NOPOLL(Frame::FRAME_ATTR_EXCEPTION); // Set up a frame

COMPlusThrow(kNotSupportedException, W("Arg_TypeNotSupported"));

HELPER_METHOD_FRAME_END();
}
HCIMPLEND

/*********************************************************************/
HCIMPL0(void, JIT_Overflow)
{
Expand Down