Upgrade V8 to version 4.9.385.28
https://chromium.googlesource.com/v8/v8/+/4.9.385.28
FPIIM-449
Change-Id: I4b2e74289d4bf3667f2f3dc8aa2e541f63e26eb4
diff --git a/src/date.cc b/src/date.cc
index 6b95cb7..f98ad64 100644
--- a/src/date.cc
+++ b/src/date.cc
@@ -4,8 +4,6 @@
#include "src/date.h"
-#include "src/v8.h"
-
#include "src/objects.h"
#include "src/objects-inl.h"
@@ -73,7 +71,7 @@
*year = 400 * (days / kDaysIn400Years) - kYearsOffset;
days %= kDaysIn400Years;
- DCHECK(DaysFromYearMonth(*year, 0) + days == save_days);
+ DCHECK_EQ(save_days, DaysFromYearMonth(*year, 0) + days);
days--;
int yd1 = days / kDaysIn100Years;
@@ -103,8 +101,8 @@
days += is_leap;
// Check if the date is after February.
- if (days >= 31 + 28 + is_leap) {
- days -= 31 + 28 + is_leap;
+ if (days >= 31 + 28 + BoolToInt(is_leap)) {
+ days -= 31 + 28 + BoolToInt(is_leap);
// Find the date starting from March.
for (int i = 2; i < 12; i++) {
if (days < kDaysInMonths[i]) {
@@ -177,6 +175,20 @@
}
+void DateCache::BreakDownTime(int64_t time_ms, int* year, int* month, int* day,
+ int* weekday, int* hour, int* min, int* sec,
+ int* ms) {
+ int const days = DaysFromTime(time_ms);
+ int const time_in_day_ms = TimeInDay(time_ms, days);
+ YearMonthDayFromDays(days, year, month, day);
+ *weekday = Weekday(days);
+ *hour = time_in_day_ms / (60 * 60 * 1000);
+ *min = (time_in_day_ms / (60 * 1000)) % 60;
+ *sec = (time_in_day_ms / 1000) % 60;
+ *ms = time_in_day_ms % 1000;
+}
+
+
void DateCache::ExtendTheAfterSegment(int time_sec, int offset_ms) {
if (after_->offset_ms == offset_ms &&
after_->start_sec <= time_sec + kDefaultDSTDeltaInSec &&
@@ -359,4 +371,5 @@
return result;
}
-} } // namespace v8::internal
+} // namespace internal
+} // namespace v8