Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/runtime/runtime-i18n.cc

Issue 2381843002: Add Smi::Zero and replace all Smi::FromInt(0) calls (Closed)
Patch Set: Mark Smi::kZero as V8_EXPORT_PRIVATE Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/runtime/runtime-literals.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/runtime/runtime-literals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698