// Note that for ch in the range D800-DFFF we just treat it as any other non-numeric character
//
// Workaround for https://github.com/dotnet/coreclr/issues/21051
- [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoOptimization)]
internal static double InternalGetNumericValue(int ch)
{
Debug.Assert(ch >= 0 && ch <= 0x10ffff, "ch is not in valid Unicode range.");
////////////////////////////////////////////////////////////////////////
// Workaround for https://github.com/dotnet/coreclr/issues/21051
- [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoOptimization)]
internal static byte InternalGetCategoryValue(int ch, int offset)
{
Debug.Assert(ch >= 0 && ch <= 0x10ffff, "ch is not in valid Unicode range.");
// Skip through chains of GT_RET_EXPRs (say from nested inlines)
// to the actual tree to use.
- GenTree* inlineCandidate = tree->gtRetExprVal();
+ GenTree* inlineCandidate = tree->gtRetExprVal();
+ var_types retType = tree->TypeGet();
#ifdef DEBUG
if (comp->verbose)
printf("\n");
}
#endif // DEBUG
+
+ var_types newType = tree->TypeGet();
+
+ // If we end up swapping in an RVA static we may need to retype it here,
+ // if we've reinterpreted it as a byref.
+ if ((retType != newType) && (retType == TYP_BYREF) && (tree->OperGet() == GT_IND))
+ {
+ assert(newType == TYP_I_IMPL);
+ JITDUMP("Updating type of the return GT_IND expression to TYP_BYREF\n");
+ tree->gtType = TYP_BYREF;
+ }
}
// If an inline was rejected and the call returns a struct, we may