The existing code all used NewNumberFromDouble which allocates new heap
number.
As far as I can see there was no use of SmiOrNumberFromDouble with argument
new_object set to false. I am not sure whether returning a pre-allocated
heap
number is a good idea as we can generate code which overwrites heap numbers.
This might not be hit for values returned from %NumberDiv and %NumberMod
right
now, but I think that always allocating a new heap number is the right
thing to
do.
http://codereview.chromium.org/1694004/diff/10001/11001
File src/heap.cc (right):
http://codereview.chromium.org/1694004/diff/10001/11001#newcode1832
src/heap.cc:1832: if (rep.bits == plus_zero.bits) return
Smi::FromInt(0); // not uncommon
Start comment with uppercase and end with dot.
http://codereview.chromium.org/1694004/show
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev