Index: src/full-codegen/s390/full-codegen-s390.cc |
diff --git a/src/full-codegen/s390/full-codegen-s390.cc b/src/full-codegen/s390/full-codegen-s390.cc |
index ab10e01791ef0dc5eb704663d0180159b4743fe9..3b64f711e609f41225c99d9667cc3a6e2e8f4a46 100644 |
--- a/src/full-codegen/s390/full-codegen-s390.cc |
+++ b/src/full-codegen/s390/full-codegen-s390.cc |
@@ -133,6 +133,21 @@ 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(r6, FieldMemOperand(r3, JSFunction::kLiteralsOffset)); |
+ __ LoadP(r6, FieldMemOperand(r6, LiteralsArray::kFeedbackVectorOffset)); |
+ __ LoadP(r1, FieldMemOperand(r6, TypeFeedbackVector::kInvocationCountIndex * |
+ kPointerSize + |
+ TypeFeedbackVector::kHeaderSize)); |
+ __ AddSmiLiteral(r1, r1, Smi::FromInt(1), r0); |
+ __ StoreP(r1, |
+ FieldMemOperand( |
+ r6, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + |
+ TypeFeedbackVector::kHeaderSize)); |
+ } |
+ |
{ |
Comment cmnt(masm_, "[ Allocate locals"); |
int locals_count = info->scope()->num_stack_slots(); |