V8 Project
|
#include <date.h>
Classes | |
struct | DST |
Public Member Functions | |
DateCache () | |
virtual | ~DateCache () |
void | ResetDateCache () |
int | Weekday (int days) |
bool | IsLeap (int year) |
int | LocalOffsetInMs () |
const char * | LocalTimezone (int64_t time_ms) |
int | TimezoneOffset (int64_t time_ms) |
int64_t | ToLocal (int64_t time_ms) |
int64_t | ToUTC (int64_t time_ms) |
int64_t | EquivalentTime (int64_t time_ms) |
int | EquivalentYear (int year) |
void | YearMonthDayFromDays (int days, int *year, int *month, int *day) |
int | DaysFromYearMonth (int year, int month) |
Smi * | stamp () |
void * | stamp_address () |
virtual int | GetDaylightSavingsOffsetFromOS (int64_t time_sec) |
virtual int | GetLocalOffsetFromOS () |
Static Public Member Functions | |
static int | DaysFromTime (int64_t time_ms) |
static int | TimeInDay (int64_t time_ms, int days) |
Static Public Attributes | |
static const int | kMsPerMin = 60 * 1000 |
static const int | kSecPerDay = 24 * 60 * 60 |
static const int64_t | kMsPerDay = kSecPerDay * 1000 |
static const int | kMaxEpochTimeInSec = kMaxInt |
static const int64_t | kMaxEpochTimeInMs |
static const int64_t | kMaxTimeInMs |
static const int64_t | kMaxTimeBeforeUTCInMs |
static const int | kInvalidLocalOffsetInMs = kMaxInt |
static const int | kInvalidStamp = -1 |
Private Member Functions | |
int | DaylightSavingsOffsetInMs (int64_t time_ms) |
void | ProbeDST (int time_sec) |
DST * | LeastRecentlyUsedDST (DST *skip) |
void | ExtendTheAfterSegment (int time_sec, int offset_ms) |
void | ClearSegment (DST *segment) |
bool | InvalidSegment (DST *segment) |
Private Attributes | |
Smi * | stamp_ |
DST | dst_ [kDSTSize] |
int | dst_usage_counter_ |
DST * | before_ |
DST * | after_ |
int | local_offset_ms_ |
bool | ymd_valid_ |
int | ymd_days_ |
int | ymd_year_ |
int | ymd_month_ |
int | ymd_day_ |
base::TimezoneCache * | tz_cache_ |
Static Private Attributes | |
static const int | kDefaultDSTDeltaInSec = 19 * kSecPerDay |
static const int | kDSTSize = 32 |
|
inline |
Definition at line 42 of file date.h.
References ResetDateCache().
|
inlinevirtual |
Definition at line 46 of file date.h.
References v8::base::OS::DisposeTimezoneCache(), NULL, and tz_cache_.
|
inlineprivate |
Definition at line 47 of file date.cc.
References v8::internal::DateCache::DST::end_sec, kMaxEpochTimeInSec, v8::internal::DateCache::DST::last_used, v8::internal::DateCache::DST::offset_ms, and v8::internal::DateCache::DST::start_sec.
Referenced by DaylightSavingsOffsetInMs(), LeastRecentlyUsedDST(), and ResetDateCache().
|
private |
Definition at line 200 of file date.cc.
References after_, before_, ClearSegment(), DCHECK, dst_, dst_usage_counter_, v8::internal::DateCache::DST::end_sec, EquivalentTime(), ExtendTheAfterSegment(), GetDaylightSavingsOffsetFromOS(), InvalidSegment(), kDefaultDSTDeltaInSec, kDSTSize, kMaxEpochTimeInMs, v8::internal::kMaxInt, v8::internal::DateCache::DST::last_used, v8::internal::DateCache::DST::offset_ms, ProbeDST(), v8::internal::DateCache::DST::start_sec, and UNREACHABLE.
Referenced by ToLocal(), and ToUTC().
|
inlinestatic |
Definition at line 57 of file date.h.
References kMsPerDay.
Referenced by v8::internal::JSDate::DoGetField(), EquivalentTime(), v8::internal::JSDate::GetUTCField(), and v8::internal::JSDate::SetCachedFields().
Definition at line 136 of file date.cc.
References DCHECK.
Referenced by EquivalentTime(), EquivalentYear(), and YearMonthDayFromDays().
|
inline |
Definition at line 134 of file date.h.
References DaysFromTime(), DaysFromYearMonth(), EquivalentYear(), kMsPerDay, and YearMonthDayFromDays().
Referenced by DaylightSavingsOffsetInMs(), and LocalTimezone().
Definition at line 147 of file date.h.
References DaysFromYearMonth(), IsLeap(), and Weekday().
Referenced by EquivalentTime().
Definition at line 180 of file date.cc.
References after_, before_, dst_usage_counter_, v8::internal::DateCache::DST::end_sec, kDefaultDSTDeltaInSec, v8::internal::DateCache::DST::last_used, LeastRecentlyUsedDST(), v8::internal::DateCache::DST::offset_ms, and v8::internal::DateCache::DST::start_sec.
Referenced by DaylightSavingsOffsetInMs().
|
inlinevirtual |
Definition at line 171 of file date.h.
References v8::base::OS::DaylightSavingsOffset(), and tz_cache_.
Referenced by DaylightSavingsOffsetInMs().
|
inlinevirtual |
Definition at line 177 of file date.h.
References DCHECK, kInvalidLocalOffsetInMs, v8::base::OS::LocalTimeOffset(), and tz_cache_.
Referenced by LocalOffsetInMs().
Definition at line 225 of file date.h.
References v8::internal::DateCache::DST::end_sec, and v8::internal::DateCache::DST::start_sec.
Referenced by DaylightSavingsOffsetInMs(), and ProbeDST().
Definition at line 78 of file date.h.
Referenced by EquivalentYear().
|
private |
Definition at line 350 of file date.cc.
References ClearSegment(), dst_, kDSTSize, v8::internal::DateCache::DST::last_used, and NULL.
Referenced by ExtendTheAfterSegment(), and ProbeDST().
|
inline |
Definition at line 84 of file date.h.
References GetLocalOffsetFromOS(), kInvalidLocalOffsetInMs, and local_offset_ms_.
Referenced by ToLocal(), and ToUTC().
|
inline |
Definition at line 92 of file date.h.
References EquivalentTime(), kMaxEpochTimeInMs, v8::base::OS::LocalTimezone(), and tz_cache_.
|
private |
Definition at line 310 of file date.cc.
References after_, before_, DCHECK, dst_, v8::internal::DateCache::DST::end_sec, InvalidSegment(), kDSTSize, LeastRecentlyUsedDST(), NULL, and v8::internal::DateCache::DST::start_sec.
Referenced by DaylightSavingsOffsetInMs().
void v8::internal::DateCache::ResetDateCache | ( | ) |
Definition at line 27 of file date.cc.
References after_, before_, ClearSegment(), v8::base::OS::ClearTimezoneCache(), DCHECK, dst_, dst_usage_counter_, v8::internal::Smi::FromInt(), kDSTSize, kInvalidLocalOffsetInMs, kInvalidStamp, v8::internal::Smi::kMaxValue, local_offset_ms_, stamp_, tz_cache_, v8::internal::Smi::value(), and ymd_valid_.
Referenced by DateCache(), and v8::Date::DateTimeConfigurationChangeNotification().
|
inline |
Definition at line 167 of file date.h.
References stamp_.
Referenced by v8::internal::JSDate::DoGetField(), and v8::internal::JSDate::SetCachedFields().
|
inline |
Definition at line 65 of file date.h.
References kMsPerDay.
Referenced by v8::internal::JSDate::DoGetField(), v8::internal::JSDate::GetUTCField(), and v8::internal::JSDate::SetCachedFields().
|
inline |
Definition at line 100 of file date.h.
References kMsPerMin, and ToLocal().
Referenced by v8::internal::JSDate::GetUTCField().
|
inline |
Definition at line 110 of file date.h.
References DaylightSavingsOffsetInMs(), and LocalOffsetInMs().
Referenced by v8::internal::JSDate::DoGetField(), and TimezoneOffset().
|
inline |
Definition at line 120 of file date.h.
References DaylightSavingsOffsetInMs(), and LocalOffsetInMs().
Referenced by v8::internal::RUNTIME_FUNCTION().
Definition at line 72 of file date.h.
Referenced by EquivalentYear(), v8::internal::JSDate::GetUTCField(), and v8::internal::JSDate::SetCachedFields().
Definition at line 55 of file date.cc.
References DaysFromYearMonth(), DCHECK, v8::internal::kDaysIn100Years, v8::internal::kDaysIn400Years, v8::internal::kDaysIn4Years, v8::internal::kDaysInMonths, v8::internal::kDaysOffset, v8::internal::kYearsOffset, ymd_day_, ymd_days_, ymd_month_, ymd_valid_, and ymd_year_.
Referenced by EquivalentTime(), v8::internal::JSDate::GetUTCField(), and v8::internal::JSDate::SetCachedFields().
|
private |
Definition at line 235 of file date.h.
Referenced by DaylightSavingsOffsetInMs(), ExtendTheAfterSegment(), ProbeDST(), and ResetDateCache().
|
private |
Definition at line 234 of file date.h.
Referenced by DaylightSavingsOffsetInMs(), ExtendTheAfterSegment(), ProbeDST(), and ResetDateCache().
Definition at line 232 of file date.h.
Referenced by DaylightSavingsOffsetInMs(), LeastRecentlyUsedDST(), ProbeDST(), and ResetDateCache().
|
private |
Definition at line 233 of file date.h.
Referenced by DaylightSavingsOffsetInMs(), ExtendTheAfterSegment(), and ResetDateCache().
|
staticprivate |
Definition at line 189 of file date.h.
Referenced by DaylightSavingsOffsetInMs(), and ExtendTheAfterSegment().
|
staticprivate |
Definition at line 192 of file date.h.
Referenced by DaylightSavingsOffsetInMs(), LeastRecentlyUsedDST(), ProbeDST(), and ResetDateCache().
Definition at line 37 of file date.h.
Referenced by GetLocalOffsetFromOS(), LocalOffsetInMs(), and ResetDateCache().
|
static |
Definition at line 40 of file date.h.
Referenced by ResetDateCache(), and v8::internal::JSDate::SetValue().
|
static |
Definition at line 24 of file date.h.
Referenced by DaylightSavingsOffsetInMs(), and LocalTimezone().
Definition at line 23 of file date.h.
Referenced by ClearSegment().
|
static |
Definition at line 33 of file date.h.
Referenced by v8::internal::RUNTIME_FUNCTION().
|
static |
Definition at line 28 of file date.h.
Referenced by v8::internal::RUNTIME_FUNCTION().
|
static |
Definition at line 20 of file date.h.
Referenced by DaysFromTime(), EquivalentTime(), and TimeInDay().
|
static |
Definition at line 18 of file date.h.
Referenced by TimezoneOffset().
|
static |
|
private |
Definition at line 237 of file date.h.
Referenced by LocalOffsetInMs(), and ResetDateCache().
|
private |
Definition at line 229 of file date.h.
Referenced by ResetDateCache(), stamp(), and stamp_address().
|
private |
Definition at line 246 of file date.h.
Referenced by GetDaylightSavingsOffsetFromOS(), GetLocalOffsetFromOS(), LocalTimezone(), ResetDateCache(), and ~DateCache().
|
private |
Definition at line 244 of file date.h.
Referenced by YearMonthDayFromDays().
|
private |
Definition at line 241 of file date.h.
Referenced by YearMonthDayFromDays().
|
private |
Definition at line 243 of file date.h.
Referenced by YearMonthDayFromDays().
|
private |
Definition at line 240 of file date.h.
Referenced by ResetDateCache(), and YearMonthDayFromDays().
|
private |
Definition at line 242 of file date.h.
Referenced by YearMonthDayFromDays().