OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 #ifdef V8_I18N_SUPPORT | 6 #ifdef V8_I18N_SUPPORT |
7 #include "src/runtime/runtime-utils.h" | 7 #include "src/runtime/runtime-utils.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1276 reinterpret_cast<const char*>(lang_str)); | 1276 reinterpret_cast<const char*>(lang_str)); |
1277 } | 1277 } |
1278 | 1278 |
1279 RUNTIME_FUNCTION(Runtime_DateCacheVersion) { | 1279 RUNTIME_FUNCTION(Runtime_DateCacheVersion) { |
1280 HandleScope scope(isolate); | 1280 HandleScope scope(isolate); |
1281 DCHECK_EQ(0, args.length()); | 1281 DCHECK_EQ(0, args.length()); |
1282 if (isolate->serializer_enabled()) return isolate->heap()->undefined_value(); | 1282 if (isolate->serializer_enabled()) return isolate->heap()->undefined_value(); |
1283 if (!isolate->eternal_handles()->Exists(EternalHandles::DATE_CACHE_VERSION)) { | 1283 if (!isolate->eternal_handles()->Exists(EternalHandles::DATE_CACHE_VERSION)) { |
1284 Handle<FixedArray> date_cache_version = | 1284 Handle<FixedArray> date_cache_version = |
1285 isolate->factory()->NewFixedArray(1, TENURED); | 1285 isolate->factory()->NewFixedArray(1, TENURED); |
1286 date_cache_version->set(0, Smi::FromInt(0)); | 1286 date_cache_version->set(0, Smi::kZero); |
1287 isolate->eternal_handles()->CreateSingleton( | 1287 isolate->eternal_handles()->CreateSingleton( |
1288 isolate, *date_cache_version, EternalHandles::DATE_CACHE_VERSION); | 1288 isolate, *date_cache_version, EternalHandles::DATE_CACHE_VERSION); |
1289 } | 1289 } |
1290 Handle<FixedArray> date_cache_version = | 1290 Handle<FixedArray> date_cache_version = |
1291 Handle<FixedArray>::cast(isolate->eternal_handles()->GetSingleton( | 1291 Handle<FixedArray>::cast(isolate->eternal_handles()->GetSingleton( |
1292 EternalHandles::DATE_CACHE_VERSION)); | 1292 EternalHandles::DATE_CACHE_VERSION)); |
1293 return date_cache_version->get(0); | 1293 return date_cache_version->get(0); |
1294 } | 1294 } |
1295 | 1295 |
1296 } // namespace internal | 1296 } // namespace internal |
1297 } // namespace v8 | 1297 } // namespace v8 |
1298 | 1298 |
1299 #endif // V8_I18N_SUPPORT | 1299 #endif // V8_I18N_SUPPORT |
OLD | NEW |