Rename Number.prototype.clz to Math.clz

Qantas 94 Heavy qantas94heavy at gmail.com
Thu Jan 30 19:36:11 PST 2014


My bad, should have replied to all. Thanks for clarifying though.


On Fri, Jan 31, 2014 at 11:14 AM, Brendan Eich <brendan at mozilla.com> wrote:

> Yes, that's right -- for type-inference-based JITs and AOT compilers that
> use a type-checked subset (asm.js, e.g.) this is not an issue. And as you
> noted up-thread, it matches other Math.* methods.
>
> Did you mean to reply only to me, or to reply-all?
>
> /be
>
>  Qantas 94 Heavy <mailto:qantas94heavy at gmail.com>
>> January 30, 2014 at 7:13 PM
>>
>> Sorry if this is stupid, but does that mean that it's been decided that
>> Math.clz32 will be generic (in that it won't throw a TypeError if it is not
>> a number object)?
>>
>>
>>
>> Brendan Eich <mailto:brendan at mozilla.com>
>> January 30, 2014 at 6:43 PM
>>
>>
>>
>> ToUint32 does ToNumber in its first step (http://people.mozilla.org/~
>> jorendorff/es6-draft.html#sec-touint32).
>>
>> /be
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>>
>> Qantas 94 Heavy <mailto:qantas94heavy at gmail.com>
>> January 30, 2014 at 6:26 PM
>>
>>
>> Would Math.clz32 still throw a TypeError if the argument is not a number,
>> nor an object with the [[NumberData]] internal slot? Currently all math
>> functions perform ToNumber on their arguments, unlike what
>> Number.prototype.clz is currently specified to do.
>>
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140131/1c3bf918/attachment.html>


More information about the es-discuss mailing list