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

Issue 10832166: Updated VM and JS versions of Date to allow underflow and overflow. (Closed)

Created:
8 years, 4 months ago by dominich
Modified:
8 years, 3 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Updated VM and JS versions of Date to allow underflow and overflow. Added many tests to check everything is working as expected. BUG=2771 Committed: https://code.google.com/p/dart/source/detail?r=11453

Patch Set 1 #

Total comments: 9

Patch Set 2 : Fix line lengths #

Patch Set 3 : remove loops #

Total comments: 4

Patch Set 4 : clean up unnecessary hoop-jumping #

Total comments: 4

Patch Set 5 : REmove extra days, add back throw expectation #

Total comments: 8

Patch Set 6 : simplifying further #

Patch Set 7 : rebase #

Patch Set 8 : rebase #

Patch Set 9 : suppress expected test failures (co19) #

Patch Set 10 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+196 lines, -32 lines) Patch
M lib/compiler/implementation/lib/js_helper.dart View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -13 lines 0 comments Download
M runtime/lib/date_patch.dart View 1 2 3 4 5 6 7 3 chunks +10 lines, -13 lines 0 comments Download
M tests/co19/co19-compiler.status View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M tests/co19/co19-dart2js.status View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M tests/co19/co19-runtime.status View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M tests/corelib/date_time_test.dart View 1 2 3 4 4 chunks +182 lines, -6 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
dominich
8 years, 4 months ago (2012-08-06 20:42:53 UTC) #1
floitsch
FYI. https://chromiumcodereview.appspot.com/10832166/diff/1/runtime/lib/date.dart File runtime/lib/date.dart (left): https://chromiumcodereview.appspot.com/10832166/diff/1/runtime/lib/date.dart#oldcode358 runtime/lib/date.dart:358: days += _DAYS_UNTIL_MONTH[_isLeapYear(years) ? 1 : 0][month - ...
8 years, 4 months ago (2012-08-06 21:00:58 UTC) #2
dominich
https://chromiumcodereview.appspot.com/10832166/diff/1/runtime/lib/date.dart File runtime/lib/date.dart (left): https://chromiumcodereview.appspot.com/10832166/diff/1/runtime/lib/date.dart#oldcode358 runtime/lib/date.dart:358: days += _DAYS_UNTIL_MONTH[_isLeapYear(years) ? 1 : 0][month - 1]; ...
8 years, 4 months ago (2012-08-06 21:20:58 UTC) #3
floitsch
https://chromiumcodereview.appspot.com/10832166/diff/1/runtime/lib/date.dart File runtime/lib/date.dart (left): https://chromiumcodereview.appspot.com/10832166/diff/1/runtime/lib/date.dart#oldcode358 runtime/lib/date.dart:358: days += _DAYS_UNTIL_MONTH[_isLeapYear(years) ? 1 : 0][month - 1]; ...
8 years, 4 months ago (2012-08-07 09:10:07 UTC) #4
dominich
http://codereview.chromium.org/10832166/diff/1/runtime/lib/date.dart File runtime/lib/date.dart (left): http://codereview.chromium.org/10832166/diff/1/runtime/lib/date.dart#oldcode358 runtime/lib/date.dart:358: days += _DAYS_UNTIL_MONTH[_isLeapYear(years) ? 1 : 0][month - 1]; ...
8 years, 4 months ago (2012-08-13 19:26:35 UTC) #5
floitsch
http://codereview.chromium.org/10832166/diff/1/runtime/lib/date.dart File runtime/lib/date.dart (left): http://codereview.chromium.org/10832166/diff/1/runtime/lib/date.dart#oldcode358 runtime/lib/date.dart:358: days += _DAYS_UNTIL_MONTH[_isLeapYear(years) ? 1 : 0][month - 1]; ...
8 years, 4 months ago (2012-08-13 19:41:34 UTC) #6
dominich
Tweaked a bit, but all tests pass in dart2js/d8 and none/vm.
8 years, 4 months ago (2012-08-13 21:55:27 UTC) #7
floitsch
Getting there :) https://chromiumcodereview.appspot.com/10832166/diff/9001/runtime/lib/date.dart File runtime/lib/date.dart (right): https://chromiumcodereview.appspot.com/10832166/diff/9001/runtime/lib/date.dart#newcode348 runtime/lib/date.dart:348: second += (millisecond / 1000).floor().toInt(); You ...
8 years, 4 months ago (2012-08-14 08:31:38 UTC) #8
dominich
https://chromiumcodereview.appspot.com/10832166/diff/9001/runtime/lib/date.dart File runtime/lib/date.dart (right): https://chromiumcodereview.appspot.com/10832166/diff/9001/runtime/lib/date.dart#newcode348 runtime/lib/date.dart:348: second += (millisecond / 1000).floor().toInt(); On 2012/08/14 08:31:38, floitsch ...
8 years, 4 months ago (2012-08-14 16:49:20 UTC) #9
floitsch
LGTM. I added Lasse to make sure all relevant files are updated. He is currently ...
8 years, 4 months ago (2012-08-15 08:44:26 UTC) #10
dominich
https://chromiumcodereview.appspot.com/10832166/diff/12002/runtime/lib/date.dart File runtime/lib/date.dart (right): https://chromiumcodereview.appspot.com/10832166/diff/12002/runtime/lib/date.dart#newcode250 runtime/lib/date.dart:250: const [0, 31, 59, 90, 120, 151, 181, 212, ...
8 years, 4 months ago (2012-08-17 16:38:33 UTC) #11
dominich
lrn: Can I get a LG?
8 years, 4 months ago (2012-08-23 16:32:32 UTC) #12
Lasse Reichstein Nielsen
LGTM if fixed :) https://chromiumcodereview.appspot.com/10832166/diff/5004/lib/compiler/implementation/lib/js_helper.dart File lib/compiler/implementation/lib/js_helper.dart (right): https://chromiumcodereview.appspot.com/10832166/diff/5004/lib/compiler/implementation/lib/js_helper.dart#newcode468 lib/compiler/implementation/lib/js_helper.dart:468: if (years <= 0 || ...
8 years, 4 months ago (2012-08-24 08:39:02 UTC) #13
Lasse Reichstein Nielsen
But adding the other people who are moving library files around: Mads, Anders, any problems ...
8 years, 4 months ago (2012-08-24 08:40:59 UTC) #14
Mads Ager (google)
The files are probably in new locations but the code should be the same.
8 years, 4 months ago (2012-08-24 08:43:16 UTC) #15
floitsch
https://chromiumcodereview.appspot.com/10832166/diff/5004/runtime/lib/date.dart File runtime/lib/date.dart (right): https://chromiumcodereview.appspot.com/10832166/diff/5004/runtime/lib/date.dart#newcode347 runtime/lib/date.dart:347: // simplify some calculations. On 2012/08/24 08:39:02, Lasse Reichstein ...
8 years, 4 months ago (2012-08-24 22:32:48 UTC) #16
floitsch
On 2012/08/24 08:39:02, Lasse Reichstein Nielsen wrote: > LGTM if fixed :) > > https://chromiumcodereview.appspot.com/10832166/diff/5004/lib/compiler/implementation/lib/js_helper.dart ...
8 years, 4 months ago (2012-08-24 22:34:09 UTC) #17
dominich
made the changes to the method i'd already touched. if you want me to make ...
8 years, 4 months ago (2012-08-24 22:57:48 UTC) #18
dominich
On 2012/08/24 22:57:48, dominich wrote: > made the changes to the method i'd already touched. ...
8 years, 3 months ago (2012-08-27 20:50:15 UTC) #19
Lasse Reichstein Nielsen
On 2012/08/27 20:50:15, dominich wrote: > On 2012/08/24 22:57:48, dominich wrote: > > made the ...
8 years, 3 months ago (2012-08-28 09:18:30 UTC) #20
dominich
co19 tests are out of date so we need to suppress them.
8 years, 3 months ago (2012-08-28 21:09:37 UTC) #21
floitsch
8 years, 3 months ago (2012-08-29 08:39:37 UTC) #22
co19 status file updates LGTM.

Powered by Google App Engine
This is Rietveld 408576698