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

Issue 1032007: Rename grisu to fast_dtoa. Get rid of template. (Closed)

Created:
10 years, 9 months ago by Florian Loitsch
Modified:
9 years, 7 months ago
Reviewers:
William Hesse
CC:
v8-dev
Visibility:
Public.

Description

Rename grisu to fast-dtoa. Get rid of template. Committed: http://code.google.com/p/v8/source/detail?r=4181

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 28

Patch Set 3 : '' #

Total comments: 14

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+256 lines, -907 lines) Patch
M src/SConscript View 1 1 chunk +1 line, -1 line 0 comments Download
M src/conversions.cc View 1 3 chunks +7 lines, -7 lines 0 comments Download
A + src/fast-dtoa.h View 2 2 chunks +8 lines, -8 lines 0 comments Download
A + src/fast-dtoa.cc View 2 3 7 chunks +221 lines, -207 lines 0 comments Download
D src/grisu3.h View 1 chunk +0 lines, -55 lines 0 comments Download
D src/grisu3.cc View 1 chunk +0 lines, -494 lines 0 comments Download
M test/cctest/SConscript View 1 1 chunk +1 line, -1 line 0 comments Download
A + test/cctest/test-fast-dtoa.cc View 6 chunks +16 lines, -16 lines 0 comments Download
D test/cctest/test-grisu3.cc View 1 chunk +0 lines, -116 lines 0 comments Download
M tools/gyp/v8.gyp View 1 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Florian Loitsch
10 years, 9 months ago (2010-03-17 17:28:27 UTC) #1
Florian Loitsch
Just learned that filenames should not contain underscores. I will prepare another patch for the ...
10 years, 9 months ago (2010-03-17 17:48:34 UTC) #2
William Hesse
Looking at this, I don't think the flexibility given by an arbitrary alpha and gamma ...
10 years, 9 months ago (2010-03-18 10:00:11 UTC) #3
Florian Loitsch
http://codereview.chromium.org/1032007/diff/9001/10010 File src/fast-dtoa.cc (right): http://codereview.chromium.org/1032007/diff/9001/10010#newcode40 src/fast-dtoa.cc:40: // the result of multiplying the input number with ...
10 years, 9 months ago (2010-03-18 11:56:55 UTC) #4
William Hesse
LGTM, with comments. http://codereview.chromium.org/1032007/diff/21001/22010 File src/fast-dtoa.cc (right): http://codereview.chromium.org/1032007/diff/21001/22010#newcode43 src/fast-dtoa.cc:43: // The bigger the range, the ...
10 years, 9 months ago (2010-03-18 12:36:44 UTC) #5
Florian Loitsch
10 years, 9 months ago (2010-03-18 13:16:11 UTC) #6
http://codereview.chromium.org/1032007/diff/21001/22010
File src/fast-dtoa.cc (right):

http://codereview.chromium.org/1032007/diff/21001/22010#newcode43
src/fast-dtoa.cc:43: // The bigger the range, the fewer cached numbers we need.
On 2010/03/18 12:36:45, William Hesse wrote:
> Goodbye line.

Done.

http://codereview.chromium.org/1032007/diff/21001/22010#newcode111
src/fast-dtoa.cc:111: // Note that buffer could lie anywhere inside the range
too_low to too_high.
On 2010/03/18 12:36:45, William Hesse wrote:
> the value of buffer

Done.

http://codereview.chromium.org/1032007/diff/21001/22010#newcode127
src/fast-dtoa.cc:127: // that the chosen one is closer to any number within the
range w_low to
On 2010/03/18 12:36:45, William Hesse wrote:
> is closer to both w_low and w_high, since v can be anywhere between them.

Done.

http://codereview.chromium.org/1032007/diff/21001/22010#newcode130
src/fast-dtoa.cc:130: // By generating the digits of too_high we got the biggest
last digit.
On 2010/03/18 12:36:45, William Hesse wrote:
> we got the largest buffer that might round to v.

Done.

http://codereview.chromium.org/1032007/diff/21001/22010#newcode145
src/fast-dtoa.cc:145: small_distance - rest >= rest + ten_kappa -
small_distance)) {
On 2010/03/18 12:36:45, William Hesse wrote:
> Aren't tests 1 and 3 redundant:
> small_distance - rest > 0
> 
> (small_distance - rest > ten_kappa ||
> small_distance - rest >= ten_kappa/2)
> 
> 
> 
They are redundant, but only if we don't take into account overflows.
If rest > small_distance, then small_distance - rest underflows which would make
the third test fail. Maybe there are other ways to get around this, but a simple
test in the beginning seems to be the easiest solution.

http://codereview.chromium.org/1032007/diff/21001/22010#newcode177
src/fast-dtoa.cc:177: // Returns the biggest power of ten that is less or equal
than the given
On 2010/03/18 12:36:45, William Hesse wrote:
> less than or equal to

Done.

http://codereview.chromium.org/1032007/diff/21001/22010#newcode179
src/fast-dtoa.cc:179: // If number_bits == 0 then 0^-1 is returned
On 2010/03/18 12:36:45, William Hesse wrote:
> Precondition: (1 << (number_bits + 1)) > number >= (1 << number_bits)

Done.

Powered by Google App Engine
This is Rietveld 408576698