You don't have to worry about Array subclassing just yet - it does not work
in
V8 anyway.
https://codereview.chromium.org/771483002/diff/20001/src/runtime/runtime-array.cc
File src/runtime/runtime-array.cc (right):
https://codereview.chromium.org/771483002/diff/20001/src/runtime/runtime-array.cc#newcode463
src/runtime/runtime-array.cc:463: Runtime::GetObjectProperty(isolate,
receiver, key), false);
Here you use whatever length the incoming object gives you, so it does
not have "the amazing Array length behavior". This means that the
assumptions in remainder of this method do not hold, in particular
DCHECKs in lines 477 and 511.
https://codereview.chromium.org/771483002/diff/20001/test/mjsunit/harmony/array-concat.js
File test/mjsunit/harmony/array-concat.js (right):
https://codereview.chromium.org/771483002/diff/20001/test/mjsunit/harmony/array-concat.js#newcode10
test/mjsunit/harmony/array-concat.js:10: assertEquals(1,
Array.prototype.concat.length);
Add a test that validates that concat works correctly on on objects in
fast mode, including Smis and doubles
https://codereview.chromium.org/771483002/diff/20001/test/mjsunit/harmony/array-concat.js#newcode185
test/mjsunit/harmony/array-concat.js:185: /*
Stray comments
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.