Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index cd93679bd085a42a99dc568a4b081d26163f6851..0ea757dfe112661272297ee34d0b3d402a9b56ca 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -4109,8 +4109,30 @@ void LCodeGen::DoCallFunction(LCallFunction* instr) { |
DCHECK(ToRegister(instr->result()).is(r0)); |
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(r3)); |
+ DCHECK(vector_register.is(r2)); |
+ |
+ AllowDeferredHandleDereference vector_structure_check; |
+ Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); |
+ int index = vector->GetIndex(instr->hydrogen()->slot()); |
+ |
+ __ Move(vector_register, vector); |
+ __ mov(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); |
+ } |
} |