Revision: 19769
Author: [email protected]
Date: Mon Mar 10 16:39:59 2014 UTC
Log: Merged r19765 into trunk branch.
Revert "Check and clear date cache in DateCurrentTime, DateLocalTimezone
and getTimezoneOffset."
[email protected]
Review URL: https://codereview.chromium.org/189413017
http://code.google.com/p/v8/source/detail?r=19769
Modified:
/trunk/src/date.h
/trunk/src/date.js
/trunk/src/objects.cc
/trunk/src/runtime.cc
/trunk/src/version.cc
=======================================
--- /trunk/src/date.h Mon Mar 10 10:03:12 2014 UTC
+++ /trunk/src/date.h Mon Mar 10 16:39:59 2014 UTC
@@ -121,13 +121,6 @@
int64_t local_ms = ToLocal(time_ms);
return static_cast<int>((time_ms - local_ms) / kMsPerMin);
}
-
- void CheckTimezone() {
- if (local_offset_ms_ != kInvalidLocalOffsetInMs &&
- local_offset_ms_ != GetLocalOffsetFromOS()) {
- ResetDateCache();
- }
- }
// ECMA 262 - 15.9.1.9
int64_t ToLocal(int64_t time_ms) {
=======================================
--- /trunk/src/date.js Mon Mar 10 10:03:12 2014 UTC
+++ /trunk/src/date.js Mon Mar 10 16:39:59 2014 UTC
@@ -42,19 +42,16 @@
var timezone_cache_time = NAN;
-var timezone_cache_timezone_offset = NAN;
var timezone_cache_timezone;
-function LocalTimezone(t, timezone_offset) {
+function LocalTimezone(t) {
if (NUMBER_IS_NAN(t)) return "";
- if (t == timezone_cache_time &&
- timezone_offset == timezone_cache_timezone_offset) {
+ if (t == timezone_cache_time) {
return timezone_cache_timezone;
}
var timezone = %DateLocalTimezone(t);
timezone_cache_time = t;
timezone_cache_timezone = timezone;
- timezone_cache_timezone_offset = timezone_offset;
return timezone;
}
@@ -248,8 +245,9 @@
function LocalTimezoneString(date) {
+ var timezone = LocalTimezone(UTC_DATE_VALUE(date));
+
var timezoneOffset = -TIMEZONE_OFFSET(date);
- var timezone = LocalTimezone(UTC_DATE_VALUE(date), timezoneOffset);
var sign = (timezoneOffset >= 0) ? 1 : -1;
var hours = FLOOR((sign * timezoneOffset)/60);
var min = FLOOR((sign * timezoneOffset)%60);
=======================================
--- /trunk/src/objects.cc Mon Mar 10 10:03:12 2014 UTC
+++ /trunk/src/objects.cc Mon Mar 10 16:39:59 2014 UTC
@@ -16344,7 +16344,6 @@
int64_t time_ms = static_cast<int64_t>(value);
if (index == kTimezoneOffset) {
- date_cache->CheckTimezone();
return Smi::FromInt(date_cache->TimezoneOffset(time_ms));
}
=======================================
--- /trunk/src/runtime.cc Mon Mar 10 10:03:12 2014 UTC
+++ /trunk/src/runtime.cc Mon Mar 10 16:39:59 2014 UTC
@@ -9549,7 +9549,6 @@
// time is milliseconds. Therefore, we floor the result of getting
// the OS time.
double millis = std::floor(OS::TimeCurrentMillis());
- isolate->date_cache()->CheckTimezone();
return isolate->heap()->NumberFromDouble(millis);
}
@@ -9596,7 +9595,6 @@
ASSERT(args.length() == 1);
CONVERT_DOUBLE_ARG_CHECKED(x, 0);
- isolate->date_cache()->CheckTimezone();
int64_t time =
isolate->date_cache()->EquivalentTime(static_cast<int64_t>(x));
const char* zone = OS::LocalTimezone(static_cast<double>(time));
return isolate->heap()->AllocateStringFromUtf8(CStrVector(zone));
=======================================
--- /trunk/src/version.cc Mon Mar 10 10:03:12 2014 UTC
+++ /trunk/src/version.cc Mon Mar 10 16:39:59 2014 UTC
@@ -35,7 +35,7 @@
#define MAJOR_VERSION 3
#define MINOR_VERSION 25
#define BUILD_NUMBER 6
-#define PATCH_LEVEL 0
+#define PATCH_LEVEL 1
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
#define IS_CANDIDATE_VERSION 0
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.