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

Side by Side Diff: src/full-codegen/mips64/full-codegen-mips64.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
« 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 2481 matching lines...) Expand 10 before | Expand all | Expand 10 after
2492 __ ld(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); 2492 __ ld(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
2493 __ push(a1); 2493 __ push(a1);
2494 EmitResolvePossiblyDirectEval(expr); 2494 EmitResolvePossiblyDirectEval(expr);
2495 2495
2496 // Touch up the stack with the resolved function. 2496 // Touch up the stack with the resolved function.
2497 __ sd(v0, MemOperand(sp, (arg_count + 1) * kPointerSize)); 2497 __ sd(v0, MemOperand(sp, (arg_count + 1) * kPointerSize));
2498 2498
2499 PrepareForBailoutForId(expr->EvalId(), BailoutState::NO_REGISTERS); 2499 PrepareForBailoutForId(expr->EvalId(), BailoutState::NO_REGISTERS);
2500 // Record source position for debugger. 2500 // Record source position for debugger.
2501 SetCallPosition(expr); 2501 SetCallPosition(expr);
2502 Handle<Code> code = CodeFactory::CallIC(isolate(), ConvertReceiverMode::kAny,
2503 expr->tail_call_mode())
2504 .code();
2505 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot())));
2502 __ ld(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); 2506 __ ld(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
2503 __ li(a0, Operand(arg_count)); 2507 __ li(a0, Operand(arg_count));
2504 __ Call(isolate()->builtins()->Call(ConvertReceiverMode::kAny, 2508 __ Call(code, RelocInfo::CODE_TARGET);
2505 expr->tail_call_mode()),
2506 RelocInfo::CODE_TARGET);
2507 OperandStackDepthDecrement(arg_count + 1); 2509 OperandStackDepthDecrement(arg_count + 1);
2508 RecordJSReturnSite(expr); 2510 RecordJSReturnSite(expr);
2509 RestoreContext(); 2511 RestoreContext();
2510 context()->DropAndPlug(1, v0); 2512 context()->DropAndPlug(1, v0);
2511 } 2513 }
2512 2514
2513 2515
2514 void FullCodeGenerator::VisitCallNew(CallNew* expr) { 2516 void FullCodeGenerator::VisitCallNew(CallNew* expr) {
2515 Comment cmnt(masm_, "[ CallNew"); 2517 Comment cmnt(masm_, "[ CallNew");
2516 // According to ECMA-262, section 11.2.2, page 44, the function 2518 // According to ECMA-262, section 11.2.2, page 44, the function
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after
3677 reinterpret_cast<uint64_t>( 3679 reinterpret_cast<uint64_t>(
3678 isolate->builtins()->OnStackReplacement()->entry())); 3680 isolate->builtins()->OnStackReplacement()->entry()));
3679 return ON_STACK_REPLACEMENT; 3681 return ON_STACK_REPLACEMENT;
3680 } 3682 }
3681 3683
3682 3684
3683 } // namespace internal 3685 } // namespace internal
3684 } // namespace v8 3686 } // namespace v8
3685 3687
3686 #endif // V8_TARGET_ARCH_MIPS64 3688 #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