LGTM.

http://codereview.chromium.org/6100005/diff/2001/src/array.js
File src/array.js (right):

http://codereview.chromium.org/6100005/diff/2001/src/array.js#newcode148
src/array.js:148: if (!IS_UNDEFINED(e) || (i in array)) {
If all actually used convert functions convert undefined to the empty
string, feel free to omit the (i in array) test, and document that
convert isn't called on undefined either.

http://codereview.chromium.org/6100005/diff/2001/src/array.js#newcode152
src/array.js:152: elements[i] = '';
Would it be slower to have a separate counter for inserts, and not
insert empty strings at all?
(And remember to set the length at the end).

http://codereview.chromium.org/6100005/diff/2001/src/array.js#newcode164
src/array.js:164: }
If you run backwards, you could expand the array in-place, and not
allocate a second array.
If the array had twice the size from the start, you wouldn't even need
to expand it - but you would waste some memory in some cases.

http://codereview.chromium.org/6100005/

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to