Index: src/builtins/mips/builtins-mips.cc |
diff --git a/src/builtins/mips/builtins-mips.cc b/src/builtins/mips/builtins-mips.cc |
index 8e696b276d32278bab3d7374d5368cc52e3886bd..f86bc13f146055d7a166bcdb30904031dc9262ca 100644 |
--- a/src/builtins/mips/builtins-mips.cc |
+++ b/src/builtins/mips/builtins-mips.cc |
@@ -1051,6 +1051,17 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { |
__ Branch(&switch_to_different_code_kind, ne, a0, |
Operand(masm->CodeObject())); // Self-reference to this code. |
+ // Increment invocation count for the function. |
+ __ lw(a0, FieldMemOperand(a1, JSFunction::kLiteralsOffset)); |
+ __ lw(a0, FieldMemOperand(a0, LiteralsArray::kFeedbackVectorOffset)); |
+ __ lw(t0, FieldMemOperand( |
+ a0, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + |
+ TypeFeedbackVector::kHeaderSize)); |
+ __ Addu(t0, t0, Operand(Smi::FromInt(1))); |
+ __ sw(t0, FieldMemOperand( |
+ a0, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + |
+ TypeFeedbackVector::kHeaderSize)); |
+ |
// Check function data field is actually a BytecodeArray object. |
if (FLAG_debug_code) { |
__ SmiTst(kInterpreterBytecodeArrayRegister, t0); |