CORINFO_HELP_THROW_TYPE_NOT_SUPPORTED#16102
Conversation
|
JIT of HW intrinsics will use this to throw from generics instantiated with unsupported types i.e. |
|
Tested on Arm64 using #16008 |
|
|
||
| HELPER_METHOD_FRAME_BEGIN_ATTRIB_NOPOLL(Frame::FRAME_ATTR_EXCEPTION); // Set up a frame | ||
|
|
||
| COMPlusThrow(kNotSupportedException, W("NotSupported_Type")); |
There was a problem hiding this comment.
This behavior is slightly different from S.N.Vector<T> that throws NSE with message "Specified type is not supported".
There was a problem hiding this comment.
This is the message the VM typically uses for this exception. I see no reason it has to match S.N.Vector<T>.
There was a problem hiding this comment.
The only difference between the two is the word "Specified", which might make it more clear that the type itself(Vector128<T>) is supported, its only the type of the generic which is not.
I don't have a strong preference either way, however.
There was a problem hiding this comment.
I see no reason it has to match S.N.Vector
The only reason is that we may implement S.N.Vector<T> via managed code in the future.
There was a problem hiding this comment.
The only reason is that we may implement S.N.Vector via managed code in the future.
Even then, we could just manually validate ahead of time (which we probably would need to do anyways, since we have "exploded" rather than purely generic APIs, due to the ISA splits).
There was a problem hiding this comment.
The other reason would be to match
ThrowHelper.ThrowNotSupportedExceptionIfNonNumericType<T>()which is currently using SR.Arg_TypeNotSupported
There was a problem hiding this comment.
It would seem to make sense to me to match ThrowHelper.ThrowNotSupportedExceptionIfNonNumericType<T>()
d4a3ca2 to
0623a4f
Compare
|
@fiigii, it would probably be good to update the x86 code to use this as well. |
Yes, I will. |
|
Arm64 intermittent fail test Windows_NT arm64 Cross Checked Innerloop Build and Test |
|
Please merge |
@jkotas @CarolEidt @tannergooding PTAL
@dotnet/jit-contrib FYI