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

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

Issue 2426693002: [ic] Unify CallIC feedback collection and handling. (Closed)
Patch Set: Also simplify BytecodeGraphBuilder::ComputeCallFrequency Created 4 years, 2 months 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
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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 2482 matching lines...) Expand 10 before | Expand all | Expand 10 after
2493 __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); 2493 __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
2494 __ push(a1); 2494 __ push(a1);
2495 EmitResolvePossiblyDirectEval(expr); 2495 EmitResolvePossiblyDirectEval(expr);
2496 2496
2497 // Touch up the stack with the resolved function. 2497 // Touch up the stack with the resolved function.
2498 __ sw(v0, MemOperand(sp, (arg_count + 1) * kPointerSize)); 2498 __ sw(v0, MemOperand(sp, (arg_count + 1) * kPointerSize));
2499 2499
2500 PrepareForBailoutForId(expr->EvalId(), BailoutState::NO_REGISTERS); 2500 PrepareForBailoutForId(expr->EvalId(), BailoutState::NO_REGISTERS);
2501 // Record source position for debugger. 2501 // Record source position for debugger.
2502 SetCallPosition(expr); 2502 SetCallPosition(expr);
2503 Handle<Code> code = CodeFactory::CallIC(isolate(), ConvertReceiverMode::kAny,
2504 expr->tail_call_mode())
2505 .code();
2506 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot())));
2503 __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); 2507 __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
2504 __ li(a0, Operand(arg_count)); 2508 __ li(a0, Operand(arg_count));
2505 __ Call(isolate()->builtins()->Call(ConvertReceiverMode::kAny, 2509 __ Call(code, RelocInfo::CODE_TARGET);
2506 expr->tail_call_mode()),
2507 RelocInfo::CODE_TARGET);
2508 OperandStackDepthDecrement(arg_count + 1); 2510 OperandStackDepthDecrement(arg_count + 1);
2509 RecordJSReturnSite(expr); 2511 RecordJSReturnSite(expr);
2510 RestoreContext(); 2512 RestoreContext();
2511 context()->DropAndPlug(1, v0); 2513 context()->DropAndPlug(1, v0);
2512 } 2514 }
2513 2515
2514 2516
2515 void FullCodeGenerator::VisitCallNew(CallNew* expr) { 2517 void FullCodeGenerator::VisitCallNew(CallNew* expr) {
2516 Comment cmnt(masm_, "[ CallNew"); 2518 Comment cmnt(masm_, "[ CallNew");
2517 // According to ECMA-262, section 11.2.2, page 44, the function 2519 // According to ECMA-262, section 11.2.2, page 44, the function
(...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after
3670 reinterpret_cast<uint32_t>( 3672 reinterpret_cast<uint32_t>(
3671 isolate->builtins()->OnStackReplacement()->entry())); 3673 isolate->builtins()->OnStackReplacement()->entry()));
3672 return ON_STACK_REPLACEMENT; 3674 return ON_STACK_REPLACEMENT;
3673 } 3675 }
3674 3676
3675 3677
3676 } // namespace internal 3678 } // namespace internal
3677 } // namespace v8 3679 } // namespace v8
3678 3680
3679 #endif // V8_TARGET_ARCH_MIPS 3681 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698