Skip to content

Commit

Permalink
Remove unnecessary shared generic check
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio0694 committed Jun 16, 2024
1 parent 1a7b1c1 commit 0ff7827
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/coreclr/vm/jitinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4580,17 +4580,13 @@ TypeCompareState CEEInfo::isNullableType(CORINFO_CLASS_HANDLE cls)
MODE_PREEMPTIVE;
} CONTRACTL_END;

TypeCompareState result = TypeCompareState::May;
TypeCompareState result;

JIT_TO_EE_TRANSITION_LEAF();

TypeHandle typeHandle = TypeHandle();

if (typeHandle != TypeHandle(g_pCanonMethodTableClass))
{
TypeHandle VMClsHnd(cls);
result = Nullable::IsNullableType(VMClsHnd) ? TypeCompareState::Must : TypeCompareState::MustNot;
}
TypeHandle typeHandle(cls);

result = Nullable::IsNullableType(VMClsHnd) ? TypeCompareState::Must : TypeCompareState::MustNot;

EE_TO_JIT_TRANSITION_LEAF();
return result;
Expand Down

0 comments on commit 0ff7827

Please sign in to comment.