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

Issue 520693004: Dart version of double.parse that works for numbers that can be represented (Closed)

Created:
6 years, 3 months ago by Lasse Reichstein Nielsen
Modified:
6 years, 2 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org, floitsch
Visibility:
Public.

Description

Dart version of double.parse that works for numbers that can be represented exactly as doubles. BUG= http://dartbug.com/17711 R=vegorov@google.com Committed: https://code.google.com/p/dart/source/detail?r=40891

Patch Set 1 #

Patch Set 2 : Also handle exponent. #

Patch Set 3 : Use double as accumulator. #

Patch Set 4 : More comments. #

Patch Set 5 : Missing int->double conversion. #

Patch Set 6 : Add test #

Patch Set 7 : More tests. #

Patch Set 8 : Earlier bailout on overflow. #

Total comments: 2

Patch Set 9 : Drop length check, rely only on value check. #

Patch Set 10 : Increase performance by ~10% #

Patch Set 11 : Use firstChar if it is a digit. #

Patch Set 12 : Loop can now be a for-loop. #

Patch Set 13 : Use ++ where appropriate. #

Patch Set 14 : Remove unused variabl. #

Total comments: 16

Patch Set 15 : Bug in test. #

Patch Set 16 : Use bools, name constant. #

Patch Set 17 : Change "*10" to "10.0*". #

Patch Set 18 : Address comments. #

Patch Set 19 : Add comment fot _tryParseSmi #

Unified diffs Side-by-side diffs Delta from patch set Stats (+431 lines, -1 line) Patch
M runtime/lib/double_patch.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +108 lines, -1 line 0 comments Download
M tests/corelib/corelib.status View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A tests/corelib/double_parse_test.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +322 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (3 generated)
Lasse Reichstein Nielsen
6 years, 2 months ago (2014-09-29 14:31:47 UTC) #2
floitsch
DBC. https://codereview.chromium.org/520693004/diff/140001/runtime/lib/double_patch.dart File runtime/lib/double_patch.dart (right): https://codereview.chromium.org/520693004/diff/140001/runtime/lib/double_patch.dart#newcode112 runtime/lib/double_patch.dart:112: if (length < 16) { Given that exponents ...
6 years, 2 months ago (2014-09-29 14:51:34 UTC) #4
Lasse Reichstein Nielsen
https://codereview.chromium.org/520693004/diff/140001/runtime/lib/double_patch.dart File runtime/lib/double_patch.dart (right): https://codereview.chromium.org/520693004/diff/140001/runtime/lib/double_patch.dart#newcode112 runtime/lib/double_patch.dart:112: if (length < 16) { Ack, I forgot the ...
6 years, 2 months ago (2014-09-30 05:45:30 UTC) #5
Lasse Reichstein Nielsen
+vegorov, -fschneider
6 years, 2 months ago (2014-10-01 12:02:14 UTC) #7
Vyacheslav Egorov (Google)
lgtm https://codereview.chromium.org/520693004/diff/260001/runtime/lib/double_patch.dart File runtime/lib/double_patch.dart (right): https://codereview.chromium.org/520693004/diff/260001/runtime/lib/double_patch.dart#newcode24 runtime/lib/double_patch.dart:24: int digitsSeen = 0; please change this to ...
6 years, 2 months ago (2014-10-02 14:27:41 UTC) #8
Lasse Reichstein Nielsen
https://codereview.chromium.org/520693004/diff/260001/runtime/lib/double_patch.dart File runtime/lib/double_patch.dart (right): https://codereview.chromium.org/520693004/diff/260001/runtime/lib/double_patch.dart#newcode24 runtime/lib/double_patch.dart:24: int digitsSeen = 0; Done. Please optimize booleans :) ...
6 years, 2 months ago (2014-10-02 14:36:44 UTC) #9
Lasse Reichstein Nielsen
6 years, 2 months ago (2014-10-03 06:01:58 UTC) #10
Message was sent while issue was closed.
Committed patchset #19 manually as r40891 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698