Skip to content

Commit 75967c2

Browse files
committed
Remove unnecessary shared generic check
1 parent 1a7b1c1 commit 75967c2

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/coreclr/vm/jitinterface.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4580,17 +4580,13 @@ TypeCompareState CEEInfo::isNullableType(CORINFO_CLASS_HANDLE cls)
45804580
MODE_PREEMPTIVE;
45814581
} CONTRACTL_END;
45824582

4583-
TypeCompareState result = TypeCompareState::May;
4583+
TypeCompareState result;
45844584

45854585
JIT_TO_EE_TRANSITION_LEAF();
45864586

4587-
TypeHandle typeHandle = TypeHandle();
4587+
TypeHandle typeHandle(cls);
45884588

4589-
if (typeHandle != TypeHandle(g_pCanonMethodTableClass))
4590-
{
4591-
TypeHandle VMClsHnd(cls);
4592-
result = Nullable::IsNullableType(VMClsHnd) ? TypeCompareState::Must : TypeCompareState::MustNot;
4593-
}
4589+
result = Nullable::IsNullableType(typeHandle) ? TypeCompareState::Must : TypeCompareState::MustNot;
45944590

45954591
EE_TO_JIT_TRANSITION_LEAF();
45964592
return result;

0 commit comments

Comments
 (0)