Index: src/crankshaft/arm64/lithium-codegen-arm64.cc |
diff --git a/src/crankshaft/arm64/lithium-codegen-arm64.cc b/src/crankshaft/arm64/lithium-codegen-arm64.cc |
index 2d24f9d96054b323f03c4cad9c8427de5404c2b9..e3b7effc1c3d885372980be9e0ec42872807ee03 100644 |
--- a/src/crankshaft/arm64/lithium-codegen-arm64.cc |
+++ b/src/crankshaft/arm64/lithium-codegen-arm64.cc |
@@ -366,33 +366,37 @@ void LCodeGen::CallCodeGeneric(Handle<Code> code, |
void LCodeGen::DoCallFunction(LCallFunction* instr) { |
+ HCallFunction* hinstr = instr->hydrogen(); |
DCHECK(ToRegister(instr->context()).is(cp)); |
DCHECK(ToRegister(instr->function()).Is(x1)); |
DCHECK(ToRegister(instr->result()).Is(x0)); |
int arity = instr->arity(); |
- ConvertReceiverMode mode = instr->hydrogen()->convert_mode(); |
- if (instr->hydrogen()->HasVectorAndSlot()) { |
+ ConvertReceiverMode mode = hinstr->convert_mode(); |
+ TailCallMode tail_call_mode = hinstr->tail_call_mode(); |
+ if (hinstr->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()); |
+ Handle<TypeFeedbackVector> vector = hinstr->feedback_vector(); |
+ int index = vector->GetIndex(hinstr->slot()); |
__ Mov(vector_register, vector); |
__ Mov(slot_register, Operand(Smi::FromInt(index))); |
- Handle<Code> ic = |
- CodeFactory::CallICInOptimizedCode(isolate(), arity, mode).code(); |
+ Handle<Code> ic = CodeFactory::CallICInOptimizedCode(isolate(), arity, mode, |
+ tail_call_mode) |
+ .code(); |
CallCode(ic, RelocInfo::CODE_TARGET, instr); |
} else { |
__ Mov(x0, arity); |
- CallCode(isolate()->builtins()->Call(mode), RelocInfo::CODE_TARGET, instr); |
+ CallCode(isolate()->builtins()->Call(mode, tail_call_mode), |
+ RelocInfo::CODE_TARGET, instr); |
} |
- RecordPushedArgumentsDelta(instr->hydrogen()->argument_delta()); |
+ RecordPushedArgumentsDelta(hinstr->argument_delta()); |
} |