Index: src/runtime/runtime-i18n.cc |
diff --git a/src/runtime/runtime-i18n.cc b/src/runtime/runtime-i18n.cc |
index 555d9e22a4d177b3feb68f076fb8e639ec6a09c3..f3d023a24fe5a460d71c38d411405858cc18ec44 100644 |
--- a/src/runtime/runtime-i18n.cc |
+++ b/src/runtime/runtime-i18n.cc |
@@ -1105,6 +1105,23 @@ RUNTIME_FUNCTION(Runtime_StringLocaleConvertCase) { |
reinterpret_cast<const char*>(lang_str)); |
} |
+RUNTIME_FUNCTION(Runtime_DateCacheVersion) { |
+ HandleScope scope(isolate); |
+ DCHECK_EQ(0, args.length()); |
+ if (isolate->serializer_enabled()) return isolate->heap()->undefined_value(); |
+ if (!isolate->eternal_handles()->Exists(EternalHandles::DATE_CACHE_VERSION)) { |
+ Handle<FixedArray> date_cache_version = |
+ isolate->factory()->NewFixedArray(1, TENURED); |
+ date_cache_version->set(0, Smi::FromInt(0)); |
+ isolate->eternal_handles()->CreateSingleton( |
+ isolate, *date_cache_version, EternalHandles::DATE_CACHE_VERSION); |
+ } |
+ Handle<FixedArray> date_cache_version = |
+ Handle<FixedArray>::cast(isolate->eternal_handles()->GetSingleton( |
+ EternalHandles::DATE_CACHE_VERSION)); |
+ return date_cache_version->get(0); |
+} |
+ |
} // namespace internal |
} // namespace v8 |