| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index 383795c8a0784134880d27122f34d13510931b3d..ae1822372fe85306740f7df0290206717f99de3a 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.cc
|
| @@ -4033,8 +4033,30 @@ void LCodeGen::DoCallFunction(LCallFunction* instr) {
|
| DCHECK(ToRegister(instr->result()).is(rax));
|
|
|
| int arity = instr->arity();
|
| - CallFunctionStub stub(isolate(), arity, instr->hydrogen()->function_flags());
|
| - CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
|
| + CallFunctionFlags flags = instr->hydrogen()->function_flags();
|
| + if (instr->hydrogen()->HasVectorAndSlot()) {
|
| + Register slot_register = ToRegister(instr->temp_slot());
|
| + Register vector_register = ToRegister(instr->temp_vector());
|
| + DCHECK(slot_register.is(rdx));
|
| + DCHECK(vector_register.is(rbx));
|
| +
|
| + AllowDeferredHandleDereference vector_structure_check;
|
| + Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
|
| + int index = vector->GetIndex(instr->hydrogen()->slot());
|
| +
|
| + __ Move(vector_register, vector);
|
| + __ Move(slot_register, Smi::FromInt(index));
|
| +
|
| + CallICState::CallType call_type =
|
| + (flags & CALL_AS_METHOD) ? CallICState::METHOD : CallICState::FUNCTION;
|
| +
|
| + Handle<Code> ic =
|
| + CodeFactory::CallICInOptimizedCode(isolate(), arity, call_type).code();
|
| + CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
| + } else {
|
| + CallFunctionStub stub(isolate(), arity, flags);
|
| + CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
|
| + }
|
| }
|
|
|
|
|
|
|