| Index: src/mips/lithium-codegen-mips.cc
|
| diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc
|
| index 194652562216c6bee905e3adce078794cfd591c8..9f2c9b610e57055524f6379fb02e7f8e94311bee 100644
|
| --- a/src/mips/lithium-codegen-mips.cc
|
| +++ b/src/mips/lithium-codegen-mips.cc
|
| @@ -3965,12 +3965,32 @@ void LCodeGen::DoCallNew(LCallNew* instr) {
|
| ASSERT(ToRegister(instr->constructor()).is(a1));
|
| ASSERT(ToRegister(instr->result()).is(v0));
|
|
|
| - CallConstructStub stub(NO_CALL_FUNCTION_FLAGS);
|
| __ li(a0, Operand(instr->arity()));
|
| + if (FLAG_optimize_constructed_arrays) {
|
| + // No cell in a2 for construct type feedback in optimized code
|
| + Handle<Object> undefined_value(isolate()->heap()->undefined_value(),
|
| + isolate());
|
| + __ li(a2, Operand(undefined_value));
|
| + }
|
| + CallConstructStub stub(NO_CALL_FUNCTION_FLAGS);
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
|
| }
|
|
|
|
|
| +void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
|
| + ASSERT(ToRegister(instr->constructor()).is(a1));
|
| + ASSERT(ToRegister(instr->result()).is(v0));
|
| + ASSERT(FLAG_optimize_constructed_arrays);
|
| +
|
| + __ li(a0, Operand(instr->arity()));
|
| + __ li(a2, Operand(instr->hydrogen()->property_cell()));
|
| + Handle<Code> array_construct_code =
|
| + isolate()->builtins()->ArrayConstructCode();
|
| +
|
| + CallCode(array_construct_code, RelocInfo::CONSTRUCT_CALL, instr);
|
| +}
|
| +
|
| +
|
| void LCodeGen::DoCallRuntime(LCallRuntime* instr) {
|
| CallRuntime(instr->function(), instr->arity(), instr);
|
| }
|
|
|