Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: src/full-codegen/mips64/full-codegen-mips64.cc

Issue 2451703002: Fix FullCodeGen to include CallICs and CallConstruct in the total ic count. (Closed)
Patch Set: Also count construct ICs in total_count. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 2381 matching lines...) Expand 10 before | Expand all | Expand 10 after
2392 } 2392 }
2393 // Update profiling counters before the tail call since we will 2393 // Update profiling counters before the tail call since we will
2394 // not return to this function. 2394 // not return to this function.
2395 EmitProfilingCounterHandlingForReturnSequence(true); 2395 EmitProfilingCounterHandlingForReturnSequence(true);
2396 } 2396 }
2397 Handle<Code> code = 2397 Handle<Code> code =
2398 CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code(); 2398 CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code();
2399 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot()))); 2399 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot())));
2400 __ ld(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); 2400 __ ld(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
2401 __ li(a0, Operand(arg_count)); 2401 __ li(a0, Operand(arg_count));
2402 __ Call(code, RelocInfo::CODE_TARGET); 2402 CallIC(code);
2403 OperandStackDepthDecrement(arg_count + 1); 2403 OperandStackDepthDecrement(arg_count + 1);
2404 2404
2405 RecordJSReturnSite(expr); 2405 RecordJSReturnSite(expr);
2406 RestoreContext(); 2406 RestoreContext();
2407 context()->DropAndPlug(1, v0); 2407 context()->DropAndPlug(1, v0);
2408 } 2408 }
2409 2409
2410 void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) { 2410 void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) {
2411 int arg_count = expr->arguments()->length(); 2411 int arg_count = expr->arguments()->length();
2412 // a6: copy of the first argument or undefined if it doesn't exist. 2412 // a6: copy of the first argument or undefined if it doesn't exist.
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
2541 2541
2542 // Load function and argument count into a1 and a0. 2542 // Load function and argument count into a1 and a0.
2543 __ li(a0, Operand(arg_count)); 2543 __ li(a0, Operand(arg_count));
2544 __ ld(a1, MemOperand(sp, arg_count * kPointerSize)); 2544 __ ld(a1, MemOperand(sp, arg_count * kPointerSize));
2545 2545
2546 // Record call targets in unoptimized code. 2546 // Record call targets in unoptimized code.
2547 __ EmitLoadTypeFeedbackVector(a2); 2547 __ EmitLoadTypeFeedbackVector(a2);
2548 __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); 2548 __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot())));
2549 2549
2550 CallConstructStub stub(isolate()); 2550 CallConstructStub stub(isolate());
2551 __ Call(stub.GetCode(), RelocInfo::CODE_TARGET); 2551 CallIC(stub.GetCode());
2552 OperandStackDepthDecrement(arg_count + 1); 2552 OperandStackDepthDecrement(arg_count + 1);
2553 PrepareForBailoutForId(expr->ReturnId(), BailoutState::TOS_REGISTER); 2553 PrepareForBailoutForId(expr->ReturnId(), BailoutState::TOS_REGISTER);
2554 RestoreContext(); 2554 RestoreContext();
2555 context()->Plug(v0); 2555 context()->Plug(v0);
2556 } 2556 }
2557 2557
2558 2558
2559 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { 2559 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
2560 SuperCallReference* super_call_ref = 2560 SuperCallReference* super_call_ref =
2561 expr->expression()->AsSuperCallReference(); 2561 expr->expression()->AsSuperCallReference();
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
3648 reinterpret_cast<uint64_t>( 3648 reinterpret_cast<uint64_t>(
3649 isolate->builtins()->OnStackReplacement()->entry())); 3649 isolate->builtins()->OnStackReplacement()->entry()));
3650 return ON_STACK_REPLACEMENT; 3650 return ON_STACK_REPLACEMENT;
3651 } 3651 }
3652 3652
3653 3653
3654 } // namespace internal 3654 } // namespace internal
3655 } // namespace v8 3655 } // namespace v8
3656 3656
3657 #endif // V8_TARGET_ARCH_MIPS64 3657 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698