The new version isn't ready to submit until %IsTypedArray becomes faster.
https://codereview.chromium.org/1186733002/diff/1/src/runtime/runtime-function.cc
File src/runtime/runtime-function.cc (right):
https://codereview.chromium.org/1186733002/diff/1/src/runtime/runtime-function.cc#newcode174
src/runtime/runtime-function.cc:174: // Set constructor.prototype
On 2015/06/13 00:49:38, adamk wrote:
I'd expand this to something like:
// Set the "prototype" property of a constructor Function.
Done.
https://codereview.chromium.org/1186733002/diff/1/src/runtime/runtime-object.cc
File src/runtime/runtime-object.cc (right):
https://codereview.chromium.org/1186733002/diff/1/src/runtime/runtime-object.cc#newcode159
src/runtime/runtime-object.cc:159: // Set object.__proto__
On 2015/06/13 00:49:38, adamk wrote:
I'd say "Set the [[Prototype]] internal slot" instead, since
Runtime_SetPrototype below is what we have to use for actually setting
__proto__
from script.
Done.
https://codereview.chromium.org/1186733002/diff/1/src/typedarray.js
File src/typedarray.js (right):
https://codereview.chromium.org/1186733002/diff/1/src/typedarray.js#newcode59
src/typedarray.js:59: throw MakeTypeError(kIncompatibleMethodReceiver,
"TypedArray.buffer", this);
On 2015/06/13 00:49:38, adamk wrote:
s/buffer/byteLength/
Done.
https://codereview.chromium.org/1186733002/diff/1/src/typedarray.js#newcode66
src/typedarray.js:66: throw MakeTypeError(kIncompatibleMethodReceiver,
"TypedArray.buffer", this);
On 2015/06/13 00:49:38, adamk wrote:
byteOffset
Done.
https://codereview.chromium.org/1186733002/diff/1/src/typedarray.js#newcode72
src/typedarray.js:72: if (!%IsTypedArray(this)) {
On 2015/06/13 00:49:38, adamk wrote:
I don't know if we can afford a runtime call for these trivial
accessors. Would
blocking this change on fixing
https://code.google.com/p/v8/issues/detail?id=4182 be problematic?
Alternatively, we could add inlineable versions of this runtime
function (they'd
be pretty trivial to create).
This is sort of unrelated to v8:4182, except in that that bug probably
also needs an inlineable way to get the TypedArray tag to be done
efficiently. I think we should have both functions, and not rely on the
latter to form a funny way of checking the former.
Until then, I uploaded a new version of this patch. I won't submit this
one until that one is in, but code-wise there's no dependency, so I'll
just leave this out for review separately.
https://codereview.chromium.org/1186733002/diff/1/src/typedarray.js#newcode73
src/typedarray.js:73: throw MakeTypeError(kIncompatibleMethodReceiver,
"TypedArray.buffer", this);
On 2015/06/13 00:49:38, adamk wrote:
length
Done.
https://codereview.chromium.org/1186733002/diff/1/src/typedarray.js#newcode326
src/typedarray.js:326: utils.InstallGetter(TypedArray.prototype,
"byteOffset", TypedArray_GetByteOffset,
On 2015/06/13 00:49:38, adamk wrote:
Nit: wrap at 80 chars (I don't know why we don't have a linter to
catch this).
Same problem on some lines below.
Done.
https://codereview.chromium.org/1186733002/diff/1/src/typedarray.js#newcode351
src/typedarray.js:351: "subarray", NAMESubArray
On 2015/06/13 00:49:38, adamk wrote:
I'm guessing this is also blocked on issue 4182?
Yep.
https://codereview.chromium.org/1186733002/diff/1/test/mjsunit/es6/built-in-accessor-names.js
File test/mjsunit/es6/built-in-accessor-names.js (right):
https://codereview.chromium.org/1186733002/diff/1/test/mjsunit/es6/built-in-accessor-names.js#newcode50
test/mjsunit/es6/built-in-accessor-names.js:50: assertGetterName('get
buffer', f.prototype, 'buffer', true);
On 2015/06/13 00:49:38, adamk wrote:
Wouldn't this work with the old code just changed to:
assertGetterName('get buffer', f.prototype.__proto__, 'buffer')
The imprecision of GetPropertyDescriptor's proto chain walk seems bad
to me.
I thought it was nicer to do the proto walk because if something came
along later and shadowed that property, then that'd show up instead.
I'll change this to a numerical parameter for which level in the chain
to check for, and assert that it doesn't exist lower.
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.