LGTM with comments. There are a few places I didn't comment where you could
share the code to generate copies a little more (single instructions), but
it
might require a bit or reordering, your call.
http://codereview.chromium.org/9403018/diff/1/src/arm/lithium-codegen-arm.cc
File src/arm/lithium-codegen-arm.cc (right):
http://codereview.chromium.org/9403018/diff/1/src/arm/lithium-codegen-arm.cc#newcode4385
src/arm/lithium-codegen-arm.cc:4385: bool has_elements =
elements->length() > 0 &&
The empty fixed array should always be used when the length is zero, and
it's also COW. You could optionally add some asserts.
http://codereview.chromium.org/9403018/diff/1/src/arm/lithium-codegen-arm.cc#newcode4403
src/arm/lithium-codegen-arm.cc:4403: __ str(r2, FieldMemOperand(result,
object_offset + i));
The store is the same and can be moved out of the if.
http://codereview.chromium.org/9403018/diff/1/src/hydrogen.cc
File src/hydrogen.cc (right):
http://codereview.chromium.org/9403018/diff/1/src/hydrogen.cc#newcode3447
src/hydrogen.cc:3447: if (max_depth <= 0) return false;
Don't you want to return on 0 and assert that it's not negative?
http://codereview.chromium.org/9403018/diff/1/src/hydrogen.cc#newcode3451
src/hydrogen.cc:3451: elements->map() !=
boilerplate->GetHeap()->fixed_cow_array_map()) {
length check unnecessary.
http://codereview.chromium.org/9403018/diff/1/src/mips/lithium-codegen-mips.cc
File src/mips/lithium-codegen-mips.cc (right):
http://codereview.chromium.org/9403018/diff/1/src/mips/lithium-codegen-mips.cc#newcode4295
src/mips/lithium-codegen-mips.cc:4295: __ sw(a2, FieldMemOperand(result,
object_offset + i));
Factor our after if
http://codereview.chromium.org/9403018/diff/1/src/x64/lithium-codegen-x64.cc
File src/x64/lithium-codegen-x64.cc (right):
http://codereview.chromium.org/9403018/diff/1/src/x64/lithium-codegen-x64.cc#newcode3999
src/x64/lithium-codegen-x64.cc:3999: __ movq(FieldOperand(result,
object_offset + i), rcx);
After if
http://codereview.chromium.org/9403018/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev