https://codereview.chromium.org/1181623003/diff/1/src/harmony-array.js
File src/harmony-array.js (right):
https://codereview.chromium.org/1181623003/diff/1/src/harmony-array.js#newcode197
src/harmony-array.js:197: if (constructor === GlobalArray) {
On 2015/06/11 15:19:37, arv wrote:
On 2015/06/11 15:12:10, adamk wrote:
> On 2015/06/11 13:09:23, Toon Verwaest wrote:
> > On 2015/06/11 13:04:01, arv wrote:
> > > On 2015/06/11 08:03:14, Toon Verwaest wrote:
> > > > Is this enough? A constructor could return an array with
predefined
> > > > getters/setters...
> > >
> > > I believe this is fine.
> > >
> > > constructor here is the receiver in Array.from. The array passed
in here
is
> a
> > > new instance created from Array which will never have own
accessors.
> >
> > > function f() { var result = []; Object.defineProperty(result,
"0",
> > {value:100}); return result; }
> > > Array.from.call(f, [200])
> > (d8):1: illegal access
>
> Do you have Dan's patch patched in? This should go down the slow
path because
f
> !== GlobalArray.
Once we add support for @@species then we will have to use the slow
path again.
An assert would have been good.
Not sure I follow, Array.from/of only look at the receiver, they don't
check @@species.
https://codereview.chromium.org/1181623003/
--
--
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.