| Index: src/mips/lithium-codegen-mips.cc
|
| diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc
|
| index c22243d9588fbb6d836dfb47a8842e2d9852ecfb..faa8c9bdd8d8fc22a2f3f734d085839875eba1ea 100644
|
| --- a/src/mips/lithium-codegen-mips.cc
|
| +++ b/src/mips/lithium-codegen-mips.cc
|
| @@ -4053,8 +4053,30 @@ void LCodeGen::DoCallFunction(LCallFunction* instr) {
|
| DCHECK(ToRegister(instr->result()).is(v0));
|
|
|
| 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(a3));
|
| + DCHECK(vector_register.is(a2));
|
| +
|
| + AllowDeferredHandleDereference vector_structure_check;
|
| + Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
|
| + int index = vector->GetIndex(instr->hydrogen()->slot());
|
| +
|
| + __ li(vector_register, vector);
|
| + __ li(slot_register, Operand(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);
|
| + }
|
| }
|
|
|
|
|
|
|