Index: src/x87/code-stubs-x87.cc |
diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc |
index cab0000f2c9540835e736547331b46ced29c1d17..2d4323c93dc30153abf2b7363f020f63d674d69e 100644 |
--- a/src/x87/code-stubs-x87.cc |
+++ b/src/x87/code-stubs-x87.cc |
@@ -1951,6 +1951,11 @@ void CallIC_ArrayStub::Generate(MacroAssembler* masm) { |
factory->allocation_site_map()); |
__ j(not_equal, &miss); |
+ // Increment the call count for monomorphic function calls. |
+ __ add(FieldOperand(ebx, edx, times_half_pointer_size, |
+ FixedArray::kHeaderSize + kPointerSize), |
+ Immediate(Smi::FromInt(CallICNexus::kCallCountIncrement))); |
+ |
__ mov(ebx, ecx); |
__ mov(edx, edi); |
ArrayConstructorStub stub(masm->isolate(), arg_count()); |
@@ -2010,6 +2015,11 @@ void CallICStub::Generate(MacroAssembler* masm) { |
// convincing us that we have a monomorphic JSFunction. |
__ JumpIfSmi(edi, &extra_checks_or_miss); |
+ // Increment the call count for monomorphic function calls. |
+ __ add(FieldOperand(ebx, edx, times_half_pointer_size, |
+ FixedArray::kHeaderSize + kPointerSize), |
+ Immediate(Smi::FromInt(CallICNexus::kCallCountIncrement))); |
+ |
__ bind(&have_js_function); |
if (CallAsMethod()) { |
EmitContinueIfStrictOrNative(masm, &cont); |
@@ -2081,6 +2091,11 @@ void CallICStub::Generate(MacroAssembler* masm) { |
// Update stats. |
__ add(FieldOperand(ebx, with_types_offset), Immediate(Smi::FromInt(1))); |
+ // Initialize the call counter. |
+ __ mov(FieldOperand(ebx, edx, times_half_pointer_size, |
+ FixedArray::kHeaderSize + kPointerSize), |
+ Immediate(Smi::FromInt(CallICNexus::kCallCountIncrement))); |
+ |
// Store the function. Use a stub since we need a frame for allocation. |
// ebx - vector |
// edx - slot |