OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #include "src/date.h" | 5 #include "src/date.h" |
6 | 6 |
7 #include "src/objects.h" | 7 #include "src/objects.h" |
8 #include "src/objects-inl.h" | 8 #include "src/objects-inl.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 20 matching lines...) Expand all Loading... |
31 } | 31 } |
32 DCHECK(stamp_ != Smi::FromInt(kInvalidStamp)); | 32 DCHECK(stamp_ != Smi::FromInt(kInvalidStamp)); |
33 for (int i = 0; i < kDSTSize; ++i) { | 33 for (int i = 0; i < kDSTSize; ++i) { |
34 ClearSegment(&dst_[i]); | 34 ClearSegment(&dst_[i]); |
35 } | 35 } |
36 dst_usage_counter_ = 0; | 36 dst_usage_counter_ = 0; |
37 before_ = &dst_[0]; | 37 before_ = &dst_[0]; |
38 after_ = &dst_[1]; | 38 after_ = &dst_[1]; |
39 local_offset_ms_ = kInvalidLocalOffsetInMs; | 39 local_offset_ms_ = kInvalidLocalOffsetInMs; |
40 ymd_valid_ = false; | 40 ymd_valid_ = false; |
41 base::OS::ClearTimezoneCache(tz_cache_); | 41 tz_cache_->Clear(); |
42 } | 42 } |
43 | 43 |
44 | 44 |
45 void DateCache::ClearSegment(DST* segment) { | 45 void DateCache::ClearSegment(DST* segment) { |
46 segment->start_sec = kMaxEpochTimeInSec; | 46 segment->start_sec = kMaxEpochTimeInSec; |
47 segment->end_sec = -kMaxEpochTimeInSec; | 47 segment->end_sec = -kMaxEpochTimeInSec; |
48 segment->offset_ms = 0; | 48 segment->offset_ms = 0; |
49 segment->last_used = 0; | 49 segment->last_used = 0; |
50 } | 50 } |
51 | 51 |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 if (result == NULL || result->last_used > dst_[i].last_used) { | 366 if (result == NULL || result->last_used > dst_[i].last_used) { |
367 result = &dst_[i]; | 367 result = &dst_[i]; |
368 } | 368 } |
369 } | 369 } |
370 ClearSegment(result); | 370 ClearSegment(result); |
371 return result; | 371 return result; |
372 } | 372 } |
373 | 373 |
374 } // namespace internal | 374 } // namespace internal |
375 } // namespace v8 | 375 } // namespace v8 |
OLD | NEW |