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

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.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/mips64/full-codegen-mips64.cc ('k') | src/interpreter/bytecode-generator.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_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/full-codegen/full-codegen.h" 7 #include "src/full-codegen/full-codegen.h"
8 #include "src/ast/compile-time-value.h" 8 #include "src/ast/compile-time-value.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 2357 matching lines...) Expand 10 before | Expand all | Expand 10 after
2368 // eval. 2368 // eval.
2369 __ Push(Operand(rsp, (arg_count + 1) * kPointerSize)); 2369 __ Push(Operand(rsp, (arg_count + 1) * kPointerSize));
2370 EmitResolvePossiblyDirectEval(expr); 2370 EmitResolvePossiblyDirectEval(expr);
2371 2371
2372 // Touch up the callee. 2372 // Touch up the callee.
2373 __ movp(Operand(rsp, (arg_count + 1) * kPointerSize), rax); 2373 __ movp(Operand(rsp, (arg_count + 1) * kPointerSize), rax);
2374 2374
2375 PrepareForBailoutForId(expr->EvalId(), BailoutState::NO_REGISTERS); 2375 PrepareForBailoutForId(expr->EvalId(), BailoutState::NO_REGISTERS);
2376 2376
2377 SetCallPosition(expr); 2377 SetCallPosition(expr);
2378 Handle<Code> code = CodeFactory::CallIC(isolate(), ConvertReceiverMode::kAny,
2379 expr->tail_call_mode())
2380 .code();
2381 __ Move(rdx, SmiFromSlot(expr->CallFeedbackICSlot()));
2378 __ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); 2382 __ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize));
2379 __ Set(rax, arg_count); 2383 __ Set(rax, arg_count);
2380 __ Call(isolate()->builtins()->Call(ConvertReceiverMode::kAny, 2384 __ call(code, RelocInfo::CODE_TARGET);
2381 expr->tail_call_mode()),
2382 RelocInfo::CODE_TARGET);
2383 OperandStackDepthDecrement(arg_count + 1); 2385 OperandStackDepthDecrement(arg_count + 1);
2384 RecordJSReturnSite(expr); 2386 RecordJSReturnSite(expr);
2385 RestoreContext(); 2387 RestoreContext();
2386 context()->DropAndPlug(1, rax); 2388 context()->DropAndPlug(1, rax);
2387 } 2389 }
2388 2390
2389 2391
2390 void FullCodeGenerator::VisitCallNew(CallNew* expr) { 2392 void FullCodeGenerator::VisitCallNew(CallNew* expr) {
2391 Comment cmnt(masm_, "[ CallNew"); 2393 Comment cmnt(masm_, "[ CallNew");
2392 // According to ECMA-262, section 11.2.2, page 44, the function 2394 // According to ECMA-262, section 11.2.2, page 44, the function
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
3548 DCHECK_EQ( 3550 DCHECK_EQ(
3549 isolate->builtins()->OnStackReplacement()->entry(), 3551 isolate->builtins()->OnStackReplacement()->entry(),
3550 Assembler::target_address_at(call_target_address, unoptimized_code)); 3552 Assembler::target_address_at(call_target_address, unoptimized_code));
3551 return ON_STACK_REPLACEMENT; 3553 return ON_STACK_REPLACEMENT;
3552 } 3554 }
3553 3555
3554 } // namespace internal 3556 } // namespace internal
3555 } // namespace v8 3557 } // namespace v8
3556 3558
3557 #endif // V8_TARGET_ARCH_X64 3559 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698