Index: src/compiler/type-cache.h |
diff --git a/src/compiler/type-cache.h b/src/compiler/type-cache.h |
index 240e8bd006bbc70fc760e994f4588b5c821e7384..1f2dda816df3fd295ee83a54d9146abde1aeac56 100644 |
--- a/src/compiler/type-cache.h |
+++ b/src/compiler/type-cache.h |
@@ -5,6 +5,7 @@ |
#ifndef V8_COMPILER_TYPE_CACHE_H_ |
#define V8_COMPILER_TYPE_CACHE_H_ |
+#include "src/date.h" |
#include "src/types.h" |
namespace v8 { |
@@ -103,6 +104,12 @@ class TypeCache final { |
Type* const kStringLengthType = |
CreateNative(CreateRange(0.0, String::kMaxLength), Type::TaggedSigned()); |
+ // The JSDate::value properties 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()); |
+ |
#define TYPED_ARRAY(TypeName, type_name, TYPE_NAME, ctype, size) \ |
Type* const k##TypeName##Array = CreateArray(k##TypeName); |
TYPED_ARRAYS(TYPED_ARRAY) |