Index: src/full-codegen/mips/full-codegen-mips.cc |
diff --git a/src/full-codegen/mips/full-codegen-mips.cc b/src/full-codegen/mips/full-codegen-mips.cc |
index e3c9dfb1812ecec21240fbf418ad311f614c1fc1..544874c1980afc1e1c00771ee9fb50d8f4548774 100644 |
--- a/src/full-codegen/mips/full-codegen-mips.cc |
+++ b/src/full-codegen/mips/full-codegen-mips.cc |
@@ -137,6 +137,20 @@ void FullCodeGenerator::Generate() { |
info->set_prologue_offset(masm_->pc_offset()); |
__ Prologue(info->GeneratePreagedPrologue()); |
+ // Increment invocation count for the function. |
+ { |
+ Comment cmnt(masm_, "[ Increment invocation count"); |
+ __ 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)); |
+ } |
+ |
{ Comment cmnt(masm_, "[ Allocate locals"); |
int locals_count = info->scope()->num_stack_slots(); |
// Generators allocate locals, if any, in context slots. |