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

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

Issue 1985423003: Invalidate defaultObjects if timezone changes (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixes after review Created 4 years, 7 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.h ('k') | test/cctest/test-date.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 "src/api.h" 9 #include "src/api.h"
10 #include "src/api-natives.h" 10 #include "src/api-natives.h"
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 lang_str[2] = 0; 1098 lang_str[2] = 0;
1099 s = String::Flatten(s); 1099 s = String::Flatten(s);
1100 // TODO(jshin): Consider adding a fast path for ASCII or Latin-1. The fastpath 1100 // TODO(jshin): Consider adding a fast path for ASCII or Latin-1. The fastpath
1101 // in the root locale needs to be adjusted for az, lt and tr because even case 1101 // in the root locale needs to be adjusted for az, lt and tr because even case
1102 // mapping of ASCII range characters are different in those locales. 1102 // mapping of ASCII range characters are different in those locales.
1103 // Greek (el) does not require any adjustment, though. 1103 // Greek (el) does not require any adjustment, though.
1104 return LocaleConvertCase(s, isolate, is_upper, 1104 return LocaleConvertCase(s, isolate, is_upper,
1105 reinterpret_cast<const char*>(lang_str)); 1105 reinterpret_cast<const char*>(lang_str));
1106 } 1106 }
1107 1107
1108 RUNTIME_FUNCTION(Runtime_DateCacheVersion) {
1109 HandleScope scope(isolate);
1110 DCHECK_EQ(0, args.length());
1111 if (isolate->serializer_enabled()) return isolate->heap()->undefined_value();
1112 if (!isolate->eternal_handles()->Exists(EternalHandles::DATE_CACHE_VERSION)) {
1113 Handle<FixedArray> date_cache_version =
1114 isolate->factory()->NewFixedArray(1, TENURED);
1115 date_cache_version->set(0, Smi::FromInt(0));
1116 isolate->eternal_handles()->CreateSingleton(
1117 isolate, *date_cache_version, EternalHandles::DATE_CACHE_VERSION);
1118 }
1119 Handle<FixedArray> date_cache_version =
1120 Handle<FixedArray>::cast(isolate->eternal_handles()->GetSingleton(
1121 EternalHandles::DATE_CACHE_VERSION));
1122 return date_cache_version->get(0);
1123 }
1124
1108 } // namespace internal 1125 } // namespace internal
1109 } // namespace v8 1126 } // namespace v8
1110 1127
1111 #endif // V8_I18N_SUPPORT 1128 #endif // V8_I18N_SUPPORT
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | test/cctest/test-date.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698