I've been looking at the implementation of arrays in SpiderMonkey lately to fix
some edge-case bugs in them, and I think there might be simplifications we
could make to our code if what's suggested here were codified in ES3.1 or
similar. In particular it would be good not to be forced to repre
Kent Hansen wrote:
David-Sarah Hopwood wrote:
Kent Hansen wrote:
Hi,
What's supposed to happen when one of the built-in methods (e.g.
Array.prototype.push) tries to assign a value greater than
4294967295 to
the length property?
js> a = new Array(4294967295); a.push("foo")
0
i.e. the lengt
David-Sarah Hopwood wrote:
Kent Hansen wrote:
Hi,
What's supposed to happen when one of the built-in methods (e.g.
Array.prototype.push) tries to assign a value greater than 4294967295 to
the length property?
js> a = new Array(4294967295); a.push("foo")
0
i.e. the length becomes 0.
T
David-Sarah Hopwood wrote:
> Kent Hansen wrote:
>> Hi,
>> What's supposed to happen when one of the built-in methods (e.g.
>> Array.prototype.push) tries to assign a value greater than 4294967295 to
>> the length property?
>>
>> js> a = new Array(4294967295); a.push("foo")
>> 0
>>
>> i.e. the lengt
I wrote:
> ToArrayLength(V)
>
> 1. Call ToNumber(V).
> 2. If Result(1) is not a nonnegative integer less than or equal to
> ArrayLengthLimit, then throw a RangeError.
"... then throw a RangeError exception."
[...]
> The resulting 'concat', 'push', and 'unshift' methods can throw a
> RangeE
Kent Hansen wrote:
> Hi,
> What's supposed to happen when one of the built-in methods (e.g.
> Array.prototype.push) tries to assign a value greater than 4294967295 to
> the length property?
>
> js> a = new Array(4294967295); a.push("foo")
> 0
>
> i.e. the length becomes 0.
This is a specificatio
6 matches
Mail list logo