[Webkit-unassigned] [Bug 131707] Simple ES6 feature: Number constructor extras
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Sep 21 15:54:46 PDT 2014
https://bugs.webkit.org/show_bug.cgi?id=131707
--- Comment #15 from Diego Pino <dpino at igalia.com> 2014-09-21 15:54:45 PST ---
(From update of attachment 238259)
View in context: https://bugs.webkit.org/attachment.cgi?id=238259&action=review
>> Source/JavaScriptCore/runtime/NumberConstructor.cpp:157
>> + return JSValue::encode(jsNumber(-9007199254740991LL));
>
> I believe this is the wrong value. I believe that -9007199254740992 is safe.
The ES6 spec says the value of MIN_SAFE_VALUE is -9007199254740991 http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.min_safe_integer
>> Source/JavaScriptCore/runtime/NumberConstructor.cpp:205
>> + isInteger = std::isfinite(integer) && argument.asDouble() == integer;
>
> I don’t think the isfinite check is needed in the current version of this. If we rewrite to not use toInteger above we may or may not need this.
The std:isfinite(integer) is needed to discard values Number.POSITIVE_INFINITY and Number.NEGATIVE_INFINITY. The previous checks do not discard these values.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list