Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Unified Diff: src/date-delay.js

Issue 968001: Remove unneeded date table from JS code. This table was moved to runtime.cc. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/date-delay.js
===================================================================
--- src/date-delay.js (revision 4129)
+++ src/date-delay.js (working copy)
@@ -260,39 +260,6 @@
}
-var four_year_cycle_table = CalculateDateTable();
-
-
-function CalculateDateTable() {
- var month_lengths = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
- var four_year_cycle_table = new $Array(1461);
-
- var cumulative = 0;
- var position = 0;
- var leap_position = 0;
- for (var month = 0; month < 12; month++) {
- var month_bits = month << kMonthShift;
- var length = month_lengths[month];
- for (var day = 1; day <= length; day++) {
- four_year_cycle_table[leap_position] =
- month_bits + day;
- four_year_cycle_table[366 + position] =
- (1 << kYearShift) + month_bits + day;
- four_year_cycle_table[731 + position] =
- (2 << kYearShift) + month_bits + day;
- four_year_cycle_table[1096 + position] =
- (3 << kYearShift) + month_bits + day;
- leap_position++;
- position++;
- }
- if (month == 1) {
- four_year_cycle_table[leap_position++] = month_bits + 29;
- }
- }
- return four_year_cycle_table;
-}
-
-
var ymd_from_time_cache = [$NaN, $NaN, $NaN];
var ymd_from_time_cached_time = $NaN;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698