Index: src/mips/lithium-codegen-mips.cc |
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc |
index f8d743eeb2796cd06670f9dc1ea80bb28068cb08..7fa13107c669a91daa9e54f26edcdbd501c4490a 100644 |
--- a/src/mips/lithium-codegen-mips.cc |
+++ b/src/mips/lithium-codegen-mips.cc |
@@ -3904,8 +3904,25 @@ void LCodeGen::DoCallNewArray(LCallNewArray* instr) { |
ArrayNoArgumentConstructorStub stub(kind, disable_allocation_sites); |
CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
} else if (instr->arity() == 1) { |
+ Label done; |
+ if (IsFastPackedElementsKind(kind)) { |
+ Label packed_case; |
+ // We might need a change here |
+ // look at the first argument |
Paul Lind
2013/06/12 23:27:30
nit: End comment with period, and maybe a comma af
palfia
2013/06/12 23:37:09
Done.
|
+ __ lw(t1, MemOperand(sp, 0)); |
+ __ Branch(&packed_case, eq, t1, Operand(zero_reg)); |
+ |
+ ElementsKind holey_kind = GetHoleyElementsKind(kind); |
+ ArraySingleArgumentConstructorStub stub(holey_kind, |
+ disable_allocation_sites); |
+ CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
+ __ jmp(&done); |
+ __ bind(&packed_case); |
+ } |
+ |
ArraySingleArgumentConstructorStub stub(kind, disable_allocation_sites); |
CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
+ __ bind(&done); |
} else { |
ArrayNArgumentsConstructorStub stub(kind, disable_allocation_sites); |
CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |