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 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.

https://codereview.chromium.org/1181623003/diff/1/src/harmony-array.js#newcode200
src/harmony-array.js:200: ObjectDefineProperty(array, i, { value: value
});
non enum? non writable? non configurable?

We really should expose something faster than using this high level API
that uses property descriptors.

How about we provide a function called CreateDataPropertyOrThrow or
CreateDataProperty?

We could also skip the descriptor and use the bit mask we are using
internally (NONE, DONT_ENUM etc)

The refactoring can be done later but the descriptor (enum, writable,
configurable) needs to be fixed and tested.

https://codereview.chromium.org/1181623003/diff/1/test/mjsunit/harmony/array-from.js
File test/mjsunit/harmony/array-from.js (right):

https://codereview.chromium.org/1181623003/diff/1/test/mjsunit/harmony/array-from.js#newcode170
test/mjsunit/harmony/array-from.js:170: })();
I see that there is already a test for accessors on Array.prototype.

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.

Reply via email to