Commit f908ff22 authored by balazs.kilvady's avatar balazs.kilvady Committed by Commit bot

MIPS: Fix 'Collect call counts for constructor calls, too.'

Port a6ddbef0

Original commit message:
The TurboFan inliner makes use of these counts.

BUG=

Review-Url: https://codereview.chromium.org/2009603002
Cr-Commit-Position: refs/heads/master@{#36494}
parent cc518d39
...@@ -1986,8 +1986,8 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) { ...@@ -1986,8 +1986,8 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) {
// Initialize the call counter. // Initialize the call counter.
__ Lsa(at, a2, a3, kPointerSizeLog2 - kSmiTagSize); __ Lsa(at, a2, a3, kPointerSizeLog2 - kSmiTagSize);
__ li(t0, Operand(Smi::FromInt(1))); __ li(t0, Operand(Smi::FromInt(1)));
__ Branch(USE_DELAY_SLOT, &done);
__ sw(t0, FieldMemOperand(at, FixedArray::kHeaderSize + kPointerSize)); __ sw(t0, FieldMemOperand(at, FixedArray::kHeaderSize + kPointerSize));
__ b(&done);
__ bind(&done_increment_count); __ bind(&done_increment_count);
......
...@@ -1991,16 +1991,16 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) { ...@@ -1991,16 +1991,16 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) {
__ bind(&done_initialize_count); __ bind(&done_initialize_count);
// Initialize the call counter. // Initialize the call counter.
__ dsrl(a4, a3, 32 - kPointerSizeLog2); __ SmiScale(a4, a3, kPointerSizeLog2);
__ Daddu(a4, a2, Operand(a4)); __ Daddu(a4, a2, Operand(a4));
__ li(a5, Operand(Smi::FromInt(1))); __ li(a5, Operand(Smi::FromInt(1)));
__ Branch(USE_DELAY_SLOT, &done);
__ sd(a5, FieldMemOperand(a4, FixedArray::kHeaderSize + kPointerSize)); __ sd(a5, FieldMemOperand(a4, FixedArray::kHeaderSize + kPointerSize));
__ bind(&done);
__ bind(&done_increment_count); __ bind(&done_increment_count);
// Increment the call count for monomorphic function calls. // Increment the call count for monomorphic function calls.
__ dsrl(a4, a3, 32 - kPointerSizeLog2); __ SmiScale(a4, a3, kPointerSizeLog2);
__ Daddu(a5, a2, Operand(a4)); __ Daddu(a5, a2, Operand(a4));
__ ld(a4, FieldMemOperand(a5, FixedArray::kHeaderSize + kPointerSize)); __ ld(a4, FieldMemOperand(a5, FixedArray::kHeaderSize + kPointerSize));
__ Daddu(a4, a4, Operand(Smi::FromInt(1))); __ Daddu(a4, a4, Operand(Smi::FromInt(1)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment