I implemented %_IsMinusZero for non-crankshaft, and running without crankshaft
there seems to be no visible difference, so I guess this is not worth
implementing (there is a lot more work involved in crankshaft, too).

On 2012/01/03 07:57:48, Lasse Reichstein wrote:
http://codereview.chromium.org/9065008/diff/1/src/math.js
File src/math.js (right):

http://codereview.chromium.org/9065008/diff/1/src/math.js#newcode130
src/math.js:130: return (arg1 === 0 && !%_IsSmi(arg1) && 1 / arg1 < 0) ? arg2
:
arg1;
Ignore that. If you have +0 as a HeapNumber, that approach isn't enough, and
you
do need to do the division.
We could consider creating a %_IsMinusZero predicate to avoid the arithmetic.

http://codereview.chromium.org/9065008/diff/1/src/math.js#newcode163
src/math.js:163: return (arg1 === 0 && !%_IsSmi(arg1) && 1 / arg1 < 0) ? arg1
:
arg2;
Same problem here if +0 and -0 both are non-smi, so ariginal code is correct.



http://codereview.chromium.org/9065008/

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to