One more comment: since Array.prototype.contains is not a ES6 feature, it
should
probably be under a flag separate from --harmony-arrays. But I would prefer
to
have that discussion on intent-to-implement thread.
https://codereview.chromium.org/579973002/diff/1/src/harmony-array.js
File src/harmony-array.js (right):
https://codereview.chromium.org/579973002/diff/1/src/harmony-array.js#newcode129
src/harmony-array.js:129: function ArrayContains(searchElement /*,
fromIndex */) { // length == 1
On 2014/09/18 15:16:13, domenic wrote:
On 2014/09/18 06:26:45, Dmitry Lomov (chromium) wrote:
> Needs COERCIBLE check. (No strong preference on how you set the
length of
> function/access arguments)
There is no COERCIBLE check in the spec for any of the array methods
these days.
Its presence in V8 seems to be a separate bug?
Hmm, I see. Could you file a bug?
https://codereview.chromium.org/579973002/diff/1/src/harmony-array.js#newcode133
src/harmony-array.js:133: if (len === 0) {
On 2014/09/18 15:16:13, domenic wrote:
On 2014/09/18 06:26:45, Dmitry Lomov (chromium) wrote:
> Do you need this check? The below will work just fine for zero
length.
Yes, as otherwise we will trigger ToInteger on fromIndex, which has
observable
consequences for e.g. fromIndex = { valueOf() { /* side effects */ } }
Got it.
https://codereview.chromium.org/579973002/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.