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

Side by Side Diff: src/full-codegen/ia32/full-codegen-ia32.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_IA32 5 #if V8_TARGET_ARCH_IA32
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 2367 matching lines...) Expand 10 before | Expand all | Expand 10 after
2378 // resolve eval. 2378 // resolve eval.
2379 __ push(Operand(esp, (arg_count + 1) * kPointerSize)); 2379 __ push(Operand(esp, (arg_count + 1) * kPointerSize));
2380 EmitResolvePossiblyDirectEval(expr); 2380 EmitResolvePossiblyDirectEval(expr);
2381 2381
2382 // Touch up the stack with the resolved function. 2382 // Touch up the stack with the resolved function.
2383 __ mov(Operand(esp, (arg_count + 1) * kPointerSize), eax); 2383 __ mov(Operand(esp, (arg_count + 1) * kPointerSize), eax);
2384 2384
2385 PrepareForBailoutForId(expr->EvalId(), BailoutState::NO_REGISTERS); 2385 PrepareForBailoutForId(expr->EvalId(), BailoutState::NO_REGISTERS);
2386 2386
2387 SetCallPosition(expr); 2387 SetCallPosition(expr);
2388 Handle<Code> code = CodeFactory::CallIC(isolate(), ConvertReceiverMode::kAny,
2389 expr->tail_call_mode())
2390 .code();
2391 __ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot())));
2388 __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); 2392 __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize));
2389 __ Set(eax, arg_count); 2393 __ Move(eax, Immediate(arg_count));
2390 __ Call(isolate()->builtins()->Call(ConvertReceiverMode::kAny, 2394 __ call(code, RelocInfo::CODE_TARGET);
2391 expr->tail_call_mode()),
2392 RelocInfo::CODE_TARGET);
2393 OperandStackDepthDecrement(arg_count + 1); 2395 OperandStackDepthDecrement(arg_count + 1);
2394 RecordJSReturnSite(expr); 2396 RecordJSReturnSite(expr);
2395 RestoreContext(); 2397 RestoreContext();
2396 context()->DropAndPlug(1, eax); 2398 context()->DropAndPlug(1, eax);
2397 } 2399 }
2398 2400
2399 2401
2400 void FullCodeGenerator::VisitCallNew(CallNew* expr) { 2402 void FullCodeGenerator::VisitCallNew(CallNew* expr) {
2401 Comment cmnt(masm_, "[ CallNew"); 2403 Comment cmnt(masm_, "[ CallNew");
2402 // According to ECMA-262, section 11.2.2, page 44, the function 2404 // According to ECMA-262, section 11.2.2, page 44, the function
(...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after
3560 isolate->builtins()->OnStackReplacement()->entry(), 3562 isolate->builtins()->OnStackReplacement()->entry(),
3561 Assembler::target_address_at(call_target_address, unoptimized_code)); 3563 Assembler::target_address_at(call_target_address, unoptimized_code));
3562 return ON_STACK_REPLACEMENT; 3564 return ON_STACK_REPLACEMENT;
3563 } 3565 }
3564 3566
3565 3567
3566 } // namespace internal 3568 } // namespace internal
3567 } // namespace v8 3569 } // namespace v8
3568 3570
3569 #endif // V8_TARGET_ARCH_IA32 3571 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698