Commit 832439ab authored by mythria's avatar mythria Committed by Commit bot

Fix FullCodeGen to include CallICs and CallConstruct in the total ic count.

FullCodeGen does not include CallICs in the total ic count. Fix it by
making calls to CallIC to go through CallIC function, which keeps track
of the total number of ICs.

BUG=

Review-Url: https://codereview.chromium.org/2451703002
Cr-Commit-Position: refs/heads/master@{#40889}
parent f445f692
......@@ -2385,7 +2385,7 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
__ mov(r3, Operand(SmiFromSlot(expr->CallFeedbackICSlot())));
__ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize));
__ mov(r0, Operand(arg_count));
__ Call(code, RelocInfo::CODE_TARGET);
CallIC(code);
OperandStackDepthDecrement(arg_count + 1);
RecordJSReturnSite(expr);
......@@ -2535,7 +2535,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
__ mov(r3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot())));
CallConstructStub stub(isolate());
__ Call(stub.GetCode(), RelocInfo::CODE_TARGET);
CallIC(stub.GetCode());
OperandStackDepthDecrement(arg_count + 1);
PrepareForBailoutForId(expr->ReturnId(), BailoutState::TOS_REGISTER);
RestoreContext();
......
......@@ -2287,7 +2287,7 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
__ Mov(x3, SmiFromSlot(expr->CallFeedbackICSlot()));
__ Peek(x1, (arg_count + 1) * kXRegSize);
__ Mov(x0, arg_count);
__ Call(code, RelocInfo::CODE_TARGET);
CallIC(code);
OperandStackDepthDecrement(arg_count + 1);
RecordJSReturnSite(expr);
......@@ -2440,7 +2440,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
__ Mov(x3, SmiFromSlot(expr->CallNewFeedbackSlot()));
CallConstructStub stub(isolate());
__ Call(stub.GetCode(), RelocInfo::CODE_TARGET);
CallIC(stub.GetCode());
OperandStackDepthDecrement(arg_count + 1);
PrepareForBailoutForId(expr->ReturnId(), BailoutState::TOS_REGISTER);
RestoreContext();
......
......@@ -2286,7 +2286,7 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
__ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot())));
__ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize));
__ Move(eax, Immediate(arg_count));
__ call(code, RelocInfo::CODE_TARGET);
CallIC(code);
OperandStackDepthDecrement(arg_count + 1);
RecordJSReturnSite(expr);
......@@ -2431,7 +2431,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
__ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot())));
CallConstructStub stub(isolate());
__ call(stub.GetCode(), RelocInfo::CODE_TARGET);
CallIC(stub.GetCode());
OperandStackDepthDecrement(arg_count + 1);
PrepareForBailoutForId(expr->ReturnId(), BailoutState::TOS_REGISTER);
RestoreContext();
......
......@@ -2398,7 +2398,7 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
__ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot())));
__ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
__ li(a0, Operand(arg_count));
__ Call(code, RelocInfo::CODE_TARGET);
CallIC(code);
OperandStackDepthDecrement(arg_count + 1);
RecordJSReturnSite(expr);
......@@ -2547,7 +2547,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
__ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot())));
CallConstructStub stub(isolate());
__ Call(stub.GetCode(), RelocInfo::CODE_TARGET);
CallIC(stub.GetCode());
OperandStackDepthDecrement(arg_count + 1);
PrepareForBailoutForId(expr->ReturnId(), BailoutState::TOS_REGISTER);
RestoreContext();
......
......@@ -2397,7 +2397,7 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
__ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot())));
__ ld(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
__ li(a0, Operand(arg_count));
__ Call(code, RelocInfo::CODE_TARGET);
CallIC(code);
OperandStackDepthDecrement(arg_count + 1);
RecordJSReturnSite(expr);
......@@ -2546,7 +2546,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
__ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot())));
CallConstructStub stub(isolate());
__ Call(stub.GetCode(), RelocInfo::CODE_TARGET);
CallIC(stub.GetCode());
OperandStackDepthDecrement(arg_count + 1);
PrepareForBailoutForId(expr->ReturnId(), BailoutState::TOS_REGISTER);
RestoreContext();
......
......@@ -2275,7 +2275,7 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
__ Move(rdx, SmiFromSlot(expr->CallFeedbackICSlot()));
__ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize));
__ Set(rax, arg_count);
__ call(code, RelocInfo::CODE_TARGET);
CallIC(code);
OperandStackDepthDecrement(arg_count + 1);
RecordJSReturnSite(expr);
......@@ -2421,7 +2421,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
__ Move(rdx, SmiFromSlot(expr->CallNewFeedbackSlot()));
CallConstructStub stub(isolate());
__ Call(stub.GetCode(), RelocInfo::CODE_TARGET);
CallIC(stub.GetCode());
OperandStackDepthDecrement(arg_count + 1);
PrepareForBailoutForId(expr->ReturnId(), BailoutState::TOS_REGISTER);
RestoreContext();
......
......@@ -2278,7 +2278,7 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
__ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot())));
__ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize));
__ Move(eax, Immediate(arg_count));
__ call(code, RelocInfo::CODE_TARGET);
CallIC(code);
OperandStackDepthDecrement(arg_count + 1);
RecordJSReturnSite(expr);
......@@ -2423,7 +2423,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
__ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot())));
CallConstructStub stub(isolate());
__ call(stub.GetCode(), RelocInfo::CODE_TARGET);
CallIC(stub.GetCode());
OperandStackDepthDecrement(arg_count + 1);
PrepareForBailoutForId(expr->ReturnId(), BailoutState::TOS_REGISTER);
RestoreContext();
......
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