Index: src/crankshaft/x87/lithium-codegen-x87.cc |
diff --git a/src/crankshaft/x87/lithium-codegen-x87.cc b/src/crankshaft/x87/lithium-codegen-x87.cc |
index 21b91603ffe68f8c04ecf8925a89e1abcaed791a..3ddfc647fb5da09e232259276a6d28e1fc00fcd4 100644 |
--- a/src/crankshaft/x87/lithium-codegen-x87.cc |
+++ b/src/crankshaft/x87/lithium-codegen-x87.cc |
@@ -4004,31 +4004,35 @@ void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { |
void LCodeGen::DoCallFunction(LCallFunction* instr) { |
+ HCallFunction* hinstr = instr->hydrogen(); |
DCHECK(ToRegister(instr->context()).is(esi)); |
DCHECK(ToRegister(instr->function()).is(edi)); |
DCHECK(ToRegister(instr->result()).is(eax)); |
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(edx)); |
DCHECK(vector_register.is(ebx)); |
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, Immediate(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 { |
__ Set(eax, arity); |
- CallCode(isolate()->builtins()->Call(mode), RelocInfo::CODE_TARGET, instr); |
+ CallCode(isolate()->builtins()->Call(mode, tail_call_mode), |
+ RelocInfo::CODE_TARGET, instr); |
} |
} |