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
I'd expand this to something like:

// Set the "prototype" property of a constructor Function.

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

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);
s/buffer/byteLength/

https://codereview.chromium.org/1186733002/diff/1/src/typedarray.js#newcode66
src/typedarray.js:66: throw MakeTypeError(kIncompatibleMethodReceiver,
"TypedArray.buffer", this);
byteOffset

https://codereview.chromium.org/1186733002/diff/1/src/typedarray.js#newcode72
src/typedarray.js:72: if (!%IsTypedArray(this)) {
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).

https://codereview.chromium.org/1186733002/diff/1/src/typedarray.js#newcode73
src/typedarray.js:73: throw MakeTypeError(kIncompatibleMethodReceiver,
"TypedArray.buffer", this);
length

https://codereview.chromium.org/1186733002/diff/1/src/typedarray.js#newcode326
src/typedarray.js:326: utils.InstallGetter(TypedArray.prototype,
"byteOffset", TypedArray_GetByteOffset,
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.

https://codereview.chromium.org/1186733002/diff/1/src/typedarray.js#newcode351
src/typedarray.js:351: "subarray", NAMESubArray
I'm guessing this is also blocked on issue 4182?

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

https://codereview.chromium.org/1186733002/diff/1/test/mjsunit/harmony/sharedarraybuffer.js
File test/mjsunit/harmony/sharedarraybuffer.js (right):

https://codereview.chromium.org/1186733002/diff/1/test/mjsunit/harmony/sharedarraybuffer.js#newcode90
test/mjsunit/harmony/sharedarraybuffer.js:90: function
GetPropertyDescriptor(object, field) {
Same worry here, I'd prefer not to do a prototype walk if it can be
avoided.

https://codereview.chromium.org/1186733002/diff/1/test/mjsunit/harmony/typedarrays.js
File test/mjsunit/harmony/typedarrays.js (right):

https://codereview.chromium.org/1186733002/diff/1/test/mjsunit/harmony/typedarrays.js#newcode124
test/mjsunit/harmony/typedarrays.js:124: function
GetPropertyDescriptor(object, field) {
And here.

Maybe I'm missing something as to why the callers weren't just changed
to .__proto__?

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.

Reply via email to