LGTM.
Have you considered doing the copying using rep movsb and compare the
speed/size?


http://codereview.chromium.org/6148007/diff/6001/src/ia32/full-codegen-ia32.cc
File src/ia32/full-codegen-ia32.cc (right):

http://codereview.chromium.org/6148007/diff/6001/src/ia32/full-codegen-ia32.cc#newcode3359
src/ia32/full-codegen-ia32.cc:3359: loop_3b, loop_3b_condition;
That's a lot of loops. Could they be given more telling names? Or give
an explanation of the algorithm here, so we can see which loops do what.

http://codereview.chromium.org/6148007/diff/6001/src/ia32/full-codegen-ia32.cc#newcode3398
src/ia32/full-codegen-ia32.cc:3398: 1 << Map::kHasFastElements);
Will Copy-on-Write arrays have fast elements if queried this way?

http://codereview.chromium.org/6148007/diff/6001/src/ia32/full-codegen-ia32.cc#newcode3422
src/ia32/full-codegen-ia32.cc:3422: // Check that all array elements are
sequential ascii strings, and
ascii -> ASCII.

http://codereview.chromium.org/6148007/diff/6001/src/ia32/full-codegen-ia32.cc#newcode3423
src/ia32/full-codegen-ia32.cc:3423: // accumulate the sum of their
lengths.
Say that the sum is maintained as a Smi value.

http://codereview.chromium.org/6148007/diff/6001/src/ia32/full-codegen-ia32.cc#newcode3440
src/ia32/full-codegen-ia32.cc:3440: __ mov_b(scratch,
FieldOperand(scratch, Map::kInstanceTypeOffset));
Use movzx_b to avoid depending on the remaining bits, or use and_b and
cmp_b below.

http://codereview.chromium.org/6148007/diff/6001/src/ia32/full-codegen-ia32.cc#newcode3472
src/ia32/full-codegen-ia32.cc:3472: // Check that the separator is a
flat ascii string.
ASCII.

http://codereview.chromium.org/6148007/diff/6001/src/ia32/full-codegen-ia32.cc#newcode3487
src/ia32/full-codegen-ia32.cc:3487: __ sub(current_string_length,
Operand(scratch));
Perhaps worth noting that this can (and may) give a negative result.

http://codereview.chromium.org/6148007/

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

Reply via email to