| Index: src/arm/lithium-codegen-arm.cc
|
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
|
| index 4564d2684ec06f1699911c6d29a3158fc145657a..d8bac2e71deb677ee4b4ad3e01f92d959c7119c4 100644
|
| --- a/src/arm/lithium-codegen-arm.cc
|
| +++ b/src/arm/lithium-codegen-arm.cc
|
| @@ -4230,12 +4230,28 @@ void LCodeGen::DoCallNew(LCallNew* instr) {
|
| ASSERT(ToRegister(instr->constructor()).is(r1));
|
| ASSERT(ToRegister(instr->result()).is(r0));
|
|
|
| - CallConstructStub stub(NO_CALL_FUNCTION_FLAGS);
|
| __ mov(r0, Operand(instr->arity()));
|
| + // No cell in r2 for construct type feedback in optimized code
|
| + Handle<Object> undefined_value(isolate()->heap()->undefined_value());
|
| + __ mov(r2, Operand(undefined_value));
|
| + CallConstructStub stub(NO_CALL_FUNCTION_FLAGS);
|
| CallCode(stub.GetCode(), RelocInfo::CONSTRUCT_CALL, instr);
|
| }
|
|
|
|
|
| +void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
|
| + ASSERT(ToRegister(instr->constructor()).is(r1));
|
| + ASSERT(ToRegister(instr->result()).is(r0));
|
| +
|
| + __ mov(r0, Operand(instr->arity()));
|
| + __ mov(r2, 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);
|
| }
|
|
|