Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,13 @@ virtual public Out VisitGreaterThan_Un(Expression left, Expression right, Expres
Contract.Requires(left != null);
Contract.Requires(right != null);

// Since there is no cne instruction, ECMA-335 �III.1.5 makes a note that cgt.un may
// be used instead for the specific case where the right-hand-side is null. If the
// right side is null, we treat the instruction as a "not equal" instruction for
// improved results from the static checker.
if (decoder.IsNull(right))
return VisitNotEqual(left, right, original, data);

return DispatchCompare(VisitLessThan_Un, right, left, original, data);
}

Expand Down