Index: src/arm64/lithium-codegen-arm64.cc |
diff --git a/src/arm64/lithium-codegen-arm64.cc b/src/arm64/lithium-codegen-arm64.cc |
index 3b7c29645068824c6887fe51bf615bd0c34f0922..8a300e29b890adf9474b32e83d294ea9d5224fd3 100644 |
--- a/src/arm64/lithium-codegen-arm64.cc |
+++ b/src/arm64/lithium-codegen-arm64.cc |
@@ -410,8 +410,30 @@ void LCodeGen::DoCallFunction(LCallFunction* instr) { |
DCHECK(ToRegister(instr->result()).Is(x0)); |
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(x3)); |
+ DCHECK(vector_register.is(x2)); |
+ |
+ AllowDeferredHandleDereference vector_structure_check; |
+ Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); |
+ int index = vector->GetIndex(instr->hydrogen()->slot()); |
+ |
+ __ Mov(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); |
+ } |
after_push_argument_ = false; |
} |