Revision: 3999
Author: [email protected]
Date: Tue Mar 2 06:19:34 2010
Log: Revert change to EquivalentTime in date.js. The checks that I've
removed in the last changed were essential after all.
Review URL: http://codereview.chromium.org/660375
http://code.google.com/p/v8/source/detail?r=3999
Modified:
/branches/bleeding_edge/src/date-delay.js
/branches/bleeding_edge/src/runtime.cc
=======================================
--- /branches/bleeding_edge/src/date-delay.js Tue Mar 2 05:29:26 2010
+++ /branches/bleeding_edge/src/date-delay.js Tue Mar 2 06:19:34 2010
@@ -114,11 +114,9 @@
// the actual year if it is in the range 1970..2037
if (t >= 0 && t <= 2.1e12) return t;
- // We call the function from runtime.cc directly to avoid extra checks
which
- // are unneeded.
- var day = %DateMakeDay(EquivalentYear(YEAR_FROM_TIME(t)),
- MONTH_FROM_TIME(t),
- DATE_FROM_TIME(t));
+ var day = MakeDay(EquivalentYear(YEAR_FROM_TIME(t)),
+ MONTH_FROM_TIME(t),
+ DATE_FROM_TIME(t));
return MakeDate(day, TimeWithinDay(t));
}
=======================================
--- /branches/bleeding_edge/src/runtime.cc Tue Mar 2 05:29:26 2010
+++ /branches/bleeding_edge/src/runtime.cc Tue Mar 2 06:19:34 2010
@@ -4960,6 +4960,9 @@
year--;
month += 12;
}
+
+ ASSERT(month >= 0);
+ ASSERT(month < 12);
static const int base_day = 365*1969 + 1969/4 - 1969/100 + 1969/400;
int year1 = year - 1;
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev