Skip to content

Commit 83f166a

Browse files
committed
Update jit to handle changes to ReadOnlySpan indexer
1 parent d780f9a commit 83f166a

File tree

2 files changed

+8
-20
lines changed

2 files changed

+8
-20
lines changed

src/inc/corinfo.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,11 @@ TODO: Talk about initializing strutures before use
213213
#define SELECTANY extern __declspec(selectany)
214214
#endif
215215

216-
SELECTANY const GUID JITEEVersionIdentifier = { /* 8f51c68e-d515-425c-9e04-97e4a8148b07 */
217-
0x8f51c68e,
218-
0xd515,
219-
0x425c,
220-
{0x9e, 0x04, 0x97, 0xe4, 0xa8, 0x14, 0x8b, 0x07}
216+
SELECTANY const GUID JITEEVersionIdentifier = { /* 3c1197a4-2f0f-4048-b09f-859c11242a02 */
217+
0x3c1197a4,
218+
0x2f0f,
219+
0x4048,
220+
{0xb0, 0x9f, 0x85, 0x9c, 0x11, 0x24, 0x2a, 0x02}
221221
};
222222

223223
//////////////////////////////////////////////////////////////////////////////////////////////////////////

src/jit/importer.cpp

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3702,10 +3702,7 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis,
37023702
// BoundsCheck(index, s->_length)
37033703
// s->_pointer + index * sizeof(T)
37043704
//
3705-
// For ReadOnlySpan<T>
3706-
// Comma
3707-
// BoundsCheck(index, s->_length)
3708-
// *(s->_pointer + index * sizeof(T))
3705+
// For ReadOnlySpan<T> -- same expansion, as it now returns a readonly ref
37093706
//
37103707
// Signature should show one class type parameter, which
37113708
// we need to examine.
@@ -3758,17 +3755,8 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis,
37583755

37593756
// Prepare result
37603757
var_types resultType = JITtype2varType(sig->retType);
3761-
3762-
if (isReadOnly)
3763-
{
3764-
result = gtNewOperNode(GT_IND, resultType, result);
3765-
}
3766-
else
3767-
{
3768-
assert(resultType == result->TypeGet());
3769-
}
3770-
3771-
retNode = gtNewOperNode(GT_COMMA, resultType, boundsCheck, result);
3758+
result = gtNewOperNode(GT_IND, resultType, result);
3759+
retNode = gtNewOperNode(GT_COMMA, resultType, boundsCheck, result);
37723760

37733761
break;
37743762
}

0 commit comments

Comments
 (0)