With an upcoming patch that I am working on, it'll be possible for me to
implement the proper behavior for [[Construct]] on TypedArray. As a "bonus",
this can also give proper behavior for normal constructors, since they are
spec'd to just call the super constructor and get their individual behavior
from
Table 49. But let's save that for a little later than this patch.
https://codereview.chromium.org/1186733002/diff/40001/src/typedarray.js
File src/typedarray.js (right):
https://codereview.chromium.org/1186733002/diff/40001/src/typedarray.js#newcode59
src/typedarray.js:59: throw MakeTypeError(kIncompatibleMethodReceiver,
"TypedArray.byteLength", this);
On 2015/06/15 16:23:12, arv wrote:
long line
Done.
https://codereview.chromium.org/1186733002/diff/40001/src/typedarray.js#newcode327
src/typedarray.js:327: TypedArray_GetByteOffset, DONT_ENUM |
DONT_DELETE);
On 2015/06/15 16:23:12, arv wrote:
why DONT_DELETE?
Oops, fixed it.
https://codereview.chromium.org/1186733002/diff/40001/src/typedarray.js#newcode329
src/typedarray.js:329: TypedArray_GetByteLength, DONT_ENUM |
DONT_DELETE);
On 2015/06/15 16:23:12, arv wrote:
same here and other places. We should also have tests that these
accessors have
the right flags.
Done.
https://codereview.chromium.org/1186733002/diff/40001/src/typedarray.js#newcode333
src/typedarray.js:333: TypedArrayGetToStringTag);
On 2015/06/15 16:23:12, arv wrote:
DONT_ENUM?
Done.
https://codereview.chromium.org/1186733002/diff/40001/test/mjsunit/es6/built-in-accessor-names.js
File test/mjsunit/es6/built-in-accessor-names.js (right):
https://codereview.chromium.org/1186733002/diff/40001/test/mjsunit/es6/built-in-accessor-names.js#newcode47
test/mjsunit/es6/built-in-accessor-names.js:47: assertGetterName('get
buffer', f.prototype, 'buffer', 1);
On 2015/06/15 16:23:12, arv wrote:
I would probably just change this to `f.prototype.__proto__` or remove
the loop
and just test Uint8Array.prototype.__proto__. There are already other
tests
covering that these all have the correct prototype chain.
Where are those tests?
https://codereview.chromium.org/1186733002/diff/40001/test/mjsunit/regress/regress-typedarray-length.js
File test/mjsunit/regress/regress-typedarray-length.js (right):
https://codereview.chromium.org/1186733002/diff/40001/test/mjsunit/regress/regress-typedarray-length.js#newcode74
test/mjsunit/regress/regress-typedarray-length.js:74: // Ensure we
cannot delete length, byteOffset, byteLength.
On 2015/06/15 16:23:12, arv wrote:
I think this is invalid. Maybe justs file a bug and we can get back to
this.
Fixed it.
https://codereview.chromium.org/1186733002/
--
--
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.