Some comments.
Also I realized a bigger issue with this CL - it never goes up the prototype
chain for elements, even though the spec prescribes that.
This can be addressed in a separate CL.
https://codereview.chromium.org/771483002/diff/110001/test/mjsunit/harmony/array-concat.js
File test/mjsunit/harmony/array-concat.js (right):
https://codereview.chromium.org/771483002/diff/110001/test/mjsunit/harmony/array-concat.js#newcode164
test/mjsunit/harmony/array-concat.js:164: var args = (function() {
return arguments; })(1,2,3);
On 2014/12/11 13:09:35, caitp wrote:
On 2014/12/11 11:05:47, Dmitry Lomov (chromium) wrote:
> Yes, this test does not produce SLOPPY_ARGUMENTS_ELEMENT_KIND.
> You need a function to have both arguments and parameters to get it.
> So just replace `function f()` with `function f(x, y, z)`
> The logic that governs this is here:
>
https://code.google.com/p/chromium/codesearch#chromium/src/v8/src/runtime/runtime-scopes.cc&q=runtime-sc&sq=package:chromium&l=366
Okay --- I've added a handler for SLOPPY_ARGUMENTS_ELEMENTS, but did
not remove
the default case --- It's a simple thing to remove it, but I think
it's good to
have missing cases stand out more than just not adding the elements.
No, please remove the default case, so that compiler complains if we add
a new ElementsKind and it goes unhandled here.
Also added some tests with different variations of the sloppy
arguments object
https://codereview.chromium.org/771483002/diff/150001/src/runtime/runtime-array.cc
File src/runtime/runtime-array.cc (right):
https://codereview.chromium.org/771483002/diff/150001/src/runtime/runtime-array.cc#newcode615
src/runtime/runtime-array.cc:615: if (!element->IsTheHole()) {
Use accessor->HasElement(receiver, receiver, index) instead of checking
for hole.
https://codereview.chromium.org/771483002/
--
--
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.