Index: src/full-codegen/arm/full-codegen-arm.cc |
diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc |
index 3e020a4365591b9ab3e231ed3f829df2b06f1f6b..79a0515b3803113dee2cff35fd135c0a803a1661 100644 |
--- a/src/full-codegen/arm/full-codegen-arm.cc |
+++ b/src/full-codegen/arm/full-codegen-arm.cc |
@@ -128,6 +128,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"); |
+ __ ldr(r2, FieldMemOperand(r1, JSFunction::kLiteralsOffset)); |
+ __ ldr(r2, FieldMemOperand(r2, LiteralsArray::kFeedbackVectorOffset)); |
+ __ ldr(r9, FieldMemOperand(r2, TypeFeedbackVector::kInvocationCountIndex * |
+ kPointerSize + |
+ TypeFeedbackVector::kHeaderSize)); |
+ __ add(r9, r9, Operand(Smi::FromInt(1))); |
+ __ str(r9, FieldMemOperand(r2, 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. |