Index: src/full-codegen/ppc/full-codegen-ppc.cc |
diff --git a/src/full-codegen/ppc/full-codegen-ppc.cc b/src/full-codegen/ppc/full-codegen-ppc.cc |
index f0f12e903cb4de839d2e60c2388e33cf7f637272..58aa629461281990c7e3b2b4ab2984a0b6d821a2 100644 |
--- a/src/full-codegen/ppc/full-codegen-ppc.cc |
+++ b/src/full-codegen/ppc/full-codegen-ppc.cc |
@@ -133,6 +133,22 @@ void FullCodeGenerator::Generate() { |
info->set_prologue_offset(prologue_offset); |
__ Prologue(info->GeneratePreagedPrologue(), ip, prologue_offset); |
+ // Increment invocation count for the function. |
+ { |
+ Comment cmnt(masm_, "[ Increment invocation count"); |
+ __ LoadP(r7, FieldMemOperand(r4, JSFunction::kLiteralsOffset)); |
+ __ LoadP(r7, FieldMemOperand(r7, LiteralsArray::kFeedbackVectorOffset)); |
+ __ LoadP(r8, FieldMemOperand(r7, TypeFeedbackVector::kInvocationCountIndex * |
+ kPointerSize + |
+ TypeFeedbackVector::kHeaderSize)); |
+ __ AddSmiLiteral(r8, r8, Smi::FromInt(1), r0); |
+ __ StoreP(r8, |
+ FieldMemOperand( |
+ r7, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + |
+ TypeFeedbackVector::kHeaderSize), |
+ r0); |
+ } |
+ |
{ |
Comment cmnt(masm_, "[ Allocate locals"); |
int locals_count = info->scope()->num_stack_slots(); |