Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index 0be9626683dd30cfb2e2b604eb3b3737ee03835d..8e697c0eef4dcb322de3bb8b1a8dd7b3e461b8d1 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -754,6 +754,7 @@ void LCodeGen::DeoptimizeIf(Condition cc, LEnvironment* environment) { |
__ j(cc, &jump_table_.last().label); |
} |
} |
+ __ bind(&done); |
} |
@@ -3848,12 +3849,28 @@ void LCodeGen::DoCallNew(LCallNew* instr) { |
ASSERT(ToRegister(instr->constructor()).is(rdi)); |
ASSERT(ToRegister(instr->result()).is(rax)); |
- CallConstructStub stub(NO_CALL_FUNCTION_FLAGS); |
__ Set(rax, instr->arity()); |
+ // No cell in ebx for construct type feedback in optimized code |
+ Handle<Object> undefined_value(isolate()->factory()->undefined_value()); |
+ __ Move(rbx, 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(rdi)); |
+ ASSERT(ToRegister(instr->result()).is(rax)); |
+ |
+ __ Set(rax, instr->arity()); |
+ __ Move(rbx, 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); |
} |