@@ -1051,6 +1051,7 @@ namespace Microsoft.FSharp.Core
10511051 // gives reliable results on null values.
10521052 System.String.CompareOrdinal(( # " " x : string #),( # " " y : string #))
10531053 when 'T : decimal = System.Decimal.Compare(( # " " x: decimal #), ( # " " y: decimal #))
1054+ when 'T : DateTime = System.DateTime.Compare(( # " " x : DateTime #), ( # " " y : DateTime #))
10541055
10551056
10561057 /// Generic comparison. Implements ER mode (where "0" is returned when NaNs are compared)
@@ -1129,6 +1130,7 @@ namespace Microsoft.FSharp.Core
11291130 // gives reliable results on null values.
11301131 System.String.CompareOrdinal(( # " " x : string #),( # " " y : string #))
11311132 when 'T : decimal = System.Decimal.Compare(( # " " x: decimal #), ( # " " y: decimal #))
1133+ when 'T : DateTime = System.DateTime.Compare(( # " " x : DateTime #), ( # " " y : DateTime #))
11321134
11331135 /// Generic less-than with static optimizations for some well-known cases.
11341136 let inline GenericLessThanFast ( x : 'T ) ( y : 'T ) =
@@ -1148,6 +1150,7 @@ namespace Microsoft.FSharp.Core
11481150 when 'T : float32= ( # " clt" x y : bool #)
11491151 when 'T : char = ( # " clt" x y : bool #)
11501152 when 'T : decimal = System.Decimal.op_ LessThan (( # " " x: decimal #), ( # " " y: decimal #))
1153+ when 'T : DateTime = DateTime.Compare(( # " " x : DateTime #), ( # " " y : DateTime #)) < 0
11511154
11521155 /// Generic greater-than with static optimizations for some well-known cases.
11531156 let inline GenericGreaterThanFast ( x : 'T ) ( y : 'T ) =
@@ -1167,6 +1170,7 @@ namespace Microsoft.FSharp.Core
11671170 when 'T : float32 = ( # " cgt" x y : bool #)
11681171 when 'T : char = ( # " cgt" x y : bool #)
11691172 when 'T : decimal = System.Decimal.op_ GreaterThan (( # " " x: decimal #), ( # " " y: decimal #))
1173+ when 'T : DateTime = DateTime.Compare(( # " " x : DateTime #), ( # " " y : DateTime #)) > 0
11701174
11711175 /// Generic less-than-or-equal with static optimizations for some well-known cases.
11721176 let inline GenericLessOrEqualFast ( x : 'T ) ( y : 'T ) =
@@ -1186,6 +1190,7 @@ namespace Microsoft.FSharp.Core
11861190 when 'T : float32 = not ( # " cgt.un" x y : bool #)
11871191 when 'T : char = not ( # " cgt" x y : bool #)
11881192 when 'T : decimal = System.Decimal.op_ LessThanOrEqual (( # " " x: decimal #), ( # " " y: decimal #))
1193+ when 'T : DateTime = DateTime.Compare(( # " " x : DateTime #), ( # " " y : DateTime #)) <= 0
11891194
11901195 /// Generic greater-than-or-equal with static optimizations for some well-known cases.
11911196 let inline GenericGreaterOrEqualFast ( x : 'T ) ( y : 'T ) =
@@ -1205,6 +1210,8 @@ namespace Microsoft.FSharp.Core
12051210 when 'T : float32 = not ( # " clt.un" x y : bool #)
12061211 when 'T : char = not ( # " clt" x y : bool #)
12071212 when 'T : decimal = System.Decimal.op_ GreaterThanOrEqual (( # " " x: decimal #), ( # " " y: decimal #))
1213+
1214+ when 'T : DateTime = DateTime.Compare(( # " " x : DateTime #), ( # " " y : DateTime #)) >= 0
12081215
12091216
12101217 //-------------------------------------------------------------------------
@@ -1488,6 +1495,7 @@ namespace Microsoft.FSharp.Core
14881495 when 'T : char = ( # " ceq" x y : bool #)
14891496 when 'T : string = System.String.Equals(( # " " x : string #),( # " " y : string #))
14901497 when 'T : decimal = System.Decimal.op_ Equality(( # " " x: decimal #), ( # " " y: decimal #))
1498+ when 'T : DateTime = DateTime.Equals(( # " " x : DateTime #), ( # " " y : DateTime #))
14911499
14921500 /// Implements generic equality between two values, with PER semantics for NaN (so equality on two NaN values returns false)
14931501 //
@@ -1510,6 +1518,8 @@ namespace Microsoft.FSharp.Core
15101518 when 'T : unativeint = ( # " ceq" x y : bool #)
15111519 when 'T : string = System.String.Equals(( # " " x : string #),( # " " y : string #))
15121520 when 'T : decimal = System.Decimal.op_ Equality(( # " " x: decimal #), ( # " " y: decimal #))
1521+ when 'T : DateTime = DateTime.Equals(( # " " x : DateTime #), ( # " " y : DateTime #))
1522+
15131523
15141524 /// A compiler intrinsic generated during optimization of calls to GenericEqualityIntrinsic on tuple values.
15151525 //
@@ -1536,6 +1546,7 @@ namespace Microsoft.FSharp.Core
15361546 when 'T : unativeint = ( # " ceq" x y : bool #)
15371547 when 'T : string = System.String.Equals(( # " " x : string #),( # " " y : string #))
15381548 when 'T : decimal = System.Decimal.op_ Equality(( # " " x: decimal #), ( # " " y: decimal #))
1549+ when 'T : DateTime = DateTime.Equals(( # " " x : DateTime #), ( # " " y : DateTime #))
15391550
15401551
15411552 let inline GenericInequalityFast ( x : 'T ) ( y : 'T ) = ( not ( GenericEqualityFast x y) : bool)
0 commit comments