| Index: src/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
|
| index a1b467d7821df22b7ae8e51a45ce89847cf6f3f7..9fd6ba03318ee91eb6bc518f63aac6e760a8332a 100644
|
| --- a/src/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/ia32/lithium-codegen-ia32.cc
|
| @@ -4065,12 +4065,29 @@ void LCodeGen::DoCallNew(LCallNew* instr) {
|
| ASSERT(ToRegister(instr->constructor()).is(edi));
|
| ASSERT(ToRegister(instr->result()).is(eax));
|
|
|
| - CallConstructStub stub(NO_CALL_FUNCTION_FLAGS);
|
| __ Set(eax, Immediate(instr->arity()));
|
| + // No cell in ebx for construct type feedback in optimized code
|
| + Handle<Object> undefined_value(isolate()->heap()->undefined_value());
|
| + __ mov(ebx, Immediate(undefined_value));
|
| + CallConstructStub stub(NO_CALL_FUNCTION_FLAGS);
|
| CallCode(stub.GetCode(), RelocInfo::CONSTRUCT_CALL, instr);
|
| }
|
|
|
|
|
| +void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
|
| + ASSERT(ToRegister(instr->context()).is(esi));
|
| + ASSERT(ToRegister(instr->constructor()).is(edi));
|
| + ASSERT(ToRegister(instr->result()).is(eax));
|
| +
|
| + __ Set(eax, Immediate(instr->arity()));
|
| + __ mov(ebx, 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);
|
| }
|
|
|