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

Issue 13529014: Use locale insensitive method to parse double literals. (Closed)

Created:
7 years, 8 months ago by Vyacheslav Egorov (Google)
Modified:
7 years, 8 months ago
Reviewers:
srdjan, Ivan Posva
CC:
reviews_dartlang.org, Anton Muhin, ahe
Visibility:
Public.

Description

Use locale insensitive method to parse double literals. Using strtod does not work because Dart grammar does not necessary match grammar used by strtod. Some locales (e.g. Russian and Danish) use comma instead of dot for radix point. R=iposva@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=21074

Patch Set 1 #

Total comments: 3

Patch Set 2 : Address Srdjan's comments #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -28 lines) Patch
M runtime/lib/double.cc View 1 2 chunks +9 lines, -6 lines 4 comments Download
M runtime/vm/double_conversion.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/double_conversion.cc View 1 1 chunk +21 lines, -0 lines 0 comments Download
M runtime/vm/object.cc View 1 2 chunks +2 lines, -22 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Vyacheslav Egorov (Google)
PTAL https://codereview.chromium.org/13529014/diff/1/runtime/vm/object.cc File runtime/vm/object.cc (right): https://codereview.chromium.org/13529014/diff/1/runtime/vm/object.cc#newcode10591 runtime/vm/object.cc:10591: if (!StringToDouble(str.ToCString(), str.Length(), &double_value)) { I made it ...
7 years, 8 months ago (2013-04-05 13:45:25 UTC) #1
srdjan
DBC Do you see any performance difference in parsing doubles? Dart and JSON parsers are ...
7 years, 8 months ago (2013-04-05 16:42:02 UTC) #2
Vyacheslav Egorov (Google)
I did some pure Dart microbenchmarks but did not see any performance difference. If there ...
7 years, 8 months ago (2013-04-05 17:01:05 UTC) #3
Ivan Posva
LGTM with comments. -Ivan https://codereview.chromium.org/13529014/diff/1005/runtime/lib/double.cc File runtime/lib/double.cc (right): https://codereview.chromium.org/13529014/diff/1005/runtime/lib/double.cc#newcode240 runtime/lib/double.cc:240: ASSERT(number_string->IsOneByteString()); Please explain here why ...
7 years, 8 months ago (2013-04-05 21:56:42 UTC) #4
Vyacheslav Egorov (Google)
Thank you. Comments addressed. Landing. https://codereview.chromium.org/13529014/diff/1005/runtime/lib/double.cc File runtime/lib/double.cc (right): https://codereview.chromium.org/13529014/diff/1005/runtime/lib/double.cc#newcode240 runtime/lib/double.cc:240: ASSERT(number_string->IsOneByteString()); On 2013/04/05 21:56:42, ...
7 years, 8 months ago (2013-04-08 14:25:03 UTC) #5
Vyacheslav Egorov (Google)
7 years, 8 months ago (2013-04-08 14:32:58 UTC) #6
Message was sent while issue was closed.
Committed patchset #2 manually as r21074 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698