Index: src/compiler/type-cache.h |
diff --git a/src/compiler/type-cache.h b/src/compiler/type-cache.h |
index 69eaf11616c7d64f8115f5e8f875ae137f979819..ead40251599ac5a0c6fb0245e31861a7491f6fed 100644 |
--- a/src/compiler/type-cache.h |
+++ b/src/compiler/type-cache.h |
@@ -97,6 +97,11 @@ class TypeCache final { |
// [0, String::kMaxLength]. |
Type* const kStringLengthType = CreateRange(0.0, String::kMaxLength); |
+ // A time value always contains a tagged number in the range |
+ // [-kMaxTimeInMs, kMaxTimeInMs]. |
+ Type* const kTimeValueType = |
+ CreateRange(-DateCache::kMaxTimeInMs, DateCache::kMaxTimeInMs); |
+ |
// The JSDate::day property always contains a tagged number in the range |
// [1, 31] or NaN. |
Type* const kJSDateDayType = |
@@ -123,9 +128,8 @@ class TypeCache final { |
// The JSDate::value property always contains a tagged number in the range |
// [-kMaxTimeInMs, kMaxTimeInMs] or NaN. |
- Type* const kJSDateValueType = Type::Union( |
- CreateRange(-DateCache::kMaxTimeInMs, DateCache::kMaxTimeInMs), |
- Type::NaN(), zone()); |
+ Type* const kJSDateValueType = |
+ Type::Union(kTimeValueType, Type::NaN(), zone()); |
// The JSDate::weekday property always contains a tagged number in the range |
// [0, 6] or NaN. |