Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
JIT: retype some return expressions
Browse files Browse the repository at this point in the history
The jit is fairly tolerant of byref/native int mismatches for inline arguments
and return values. And some of the new unsafe helpers do this kind of
reinterpretation across call boundaries as well. This sometimes leads the jit
to lose track of byrefs.

A general fix for this is likely somewhat involved. For now we simply detect if
we're about to lose track of a byref when substituting a particular kind of
return expression, and retype the expression to a byref.

Fixes #21051.

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
  • Loading branch information
AndyAyersMS authored and stephentoub committed Nov 30, 2018
1 parent 2a15194 commit 8540600
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ internal static int InternalConvertToUtf32(string s, int index, out int charLeng
// 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.");
Expand Down Expand Up @@ -297,7 +296,6 @@ public static UnicodeCategory GetUnicodeCategory(int codePoint)
////////////////////////////////////////////////////////////////////////

// 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.");
Expand Down

0 comments on commit 8540600

Please sign in to comment.