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

Issue 1694004: Simplify double to number convertion. (Closed)

Created:
10 years, 8 months ago by Oleg Eterevsky
Modified:
9 years, 5 months ago
CC:
v8-dev
Visibility:
Public.

Description

Simplify double to number convertion. Committed: http://code.google.com/p/v8/source/detail?r=4550

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 2

Patch Set 4 : '' #

Total comments: 2

Patch Set 5 : '' #

Total comments: 1

Patch Set 6 : '' #

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -61 lines) Patch
M src/heap.h View 1 2 3 4 5 2 chunks +0 lines, -13 lines 0 comments Download
M src/heap.cc View 1 2 3 4 5 2 chunks +16 lines, -44 lines 0 comments Download
M src/runtime.cc View 1 2 3 4 5 3 chunks +5 lines, -4 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Oleg Eterevsky
10 years, 8 months ago (2010-04-26 10:26:50 UTC) #1
Søren Thygesen Gjesse
The existing code all used NewNumberFromDouble which allocates new heap number. As far as I ...
10 years, 8 months ago (2010-04-26 10:57:48 UTC) #2
Oleg Eterevsky
The current code used NewNumberFromDouble only in a couple of places and NumberFromDouble in 20 ...
10 years, 8 months ago (2010-04-26 11:18:28 UTC) #3
Mads Ager (chromium)
http://codereview.chromium.org/1694004/diff/17001/18001 File src/heap.cc (right): http://codereview.chromium.org/1694004/diff/17001/18001#newcode1830 src/heap.cc:1830: return minus_zero_value(); This means that we will never allocate ...
10 years, 8 months ago (2010-04-28 07:06:35 UTC) #4
Oleg Eterevsky
I've changed the return value to newly allocated HeapNumber.
10 years, 8 months ago (2010-04-28 15:22:39 UTC) #5
Mads Ager (chromium)
10 years, 7 months ago (2010-04-29 07:31:10 UTC) #6
LGTM if you change to use FastD2I and FastI2D as in the rest of the code.

http://codereview.chromium.org/1694004/diff/24001/25001
File src/heap.cc (right):

http://codereview.chromium.org/1694004/diff/24001/25001#newcode1832
src/heap.cc:1832: int int_value = static_cast<int>(value);
FastD2I(value) and FastI2D(int_value)?

Powered by Google App Engine
This is Rietveld 408576698