Index: src/builtins/x87/builtins-x87.cc |
diff --git a/src/builtins/x87/builtins-x87.cc b/src/builtins/x87/builtins-x87.cc |
index 9f85a37314a3e25309d74a713fc04f76fd6990ce..4a15f5d0fbcf93505c69699c24b877a1bb02fe2b 100644 |
--- a/src/builtins/x87/builtins-x87.cc |
+++ b/src/builtins/x87/builtins-x87.cc |
@@ -591,6 +591,13 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { |
__ cmp(ecx, FieldOperand(eax, SharedFunctionInfo::kCodeOffset)); |
__ j(not_equal, &switch_to_different_code_kind); |
+ // Increment invocation count for the function. |
+ __ EmitLoadTypeFeedbackVector(ecx); |
+ __ add(FieldOperand(ecx, |
+ TypeFeedbackVector::kInvocationCountIndex * kPointerSize + |
+ TypeFeedbackVector::kHeaderSize), |
+ Immediate(Smi::FromInt(1))); |
+ |
// Check function data field is actually a BytecodeArray object. |
if (FLAG_debug_code) { |
__ AssertNotSmi(kInterpreterBytecodeArrayRegister); |