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

Side by Side Diff: src/full-codegen/x87/full-codegen-x87.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/x64/full-codegen-x64.cc ('k') | no next file » | 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_X87 5 #if V8_TARGET_ARCH_X87
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 2263 matching lines...) Expand 10 before | Expand all | Expand 10 after
2274 } 2274 }
2275 // Update profiling counters before the tail call since we will 2275 // Update profiling counters before the tail call since we will
2276 // not return to this function. 2276 // not return to this function.
2277 EmitProfilingCounterHandlingForReturnSequence(true); 2277 EmitProfilingCounterHandlingForReturnSequence(true);
2278 } 2278 }
2279 Handle<Code> code = 2279 Handle<Code> code =
2280 CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code(); 2280 CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code();
2281 __ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot()))); 2281 __ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot())));
2282 __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); 2282 __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize));
2283 __ Move(eax, Immediate(arg_count)); 2283 __ Move(eax, Immediate(arg_count));
2284 __ call(code, RelocInfo::CODE_TARGET); 2284 CallIC(code);
2285 OperandStackDepthDecrement(arg_count + 1); 2285 OperandStackDepthDecrement(arg_count + 1);
2286 2286
2287 RecordJSReturnSite(expr); 2287 RecordJSReturnSite(expr);
2288 RestoreContext(); 2288 RestoreContext();
2289 context()->DropAndPlug(1, eax); 2289 context()->DropAndPlug(1, eax);
2290 } 2290 }
2291 2291
2292 void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) { 2292 void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) {
2293 int arg_count = expr->arguments()->length(); 2293 int arg_count = expr->arguments()->length();
2294 // Push copy of the first argument or undefined if it doesn't exist. 2294 // Push copy of the first argument or undefined if it doesn't exist.
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
2419 2419
2420 // Load function and argument count into edi and eax. 2420 // Load function and argument count into edi and eax.
2421 __ Move(eax, Immediate(arg_count)); 2421 __ Move(eax, Immediate(arg_count));
2422 __ mov(edi, Operand(esp, arg_count * kPointerSize)); 2422 __ mov(edi, Operand(esp, arg_count * kPointerSize));
2423 2423
2424 // Record call targets in unoptimized code. 2424 // Record call targets in unoptimized code.
2425 __ EmitLoadTypeFeedbackVector(ebx); 2425 __ EmitLoadTypeFeedbackVector(ebx);
2426 __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot()))); 2426 __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot())));
2427 2427
2428 CallConstructStub stub(isolate()); 2428 CallConstructStub stub(isolate());
2429 __ call(stub.GetCode(), RelocInfo::CODE_TARGET); 2429 CallIC(stub.GetCode());
2430 OperandStackDepthDecrement(arg_count + 1); 2430 OperandStackDepthDecrement(arg_count + 1);
2431 PrepareForBailoutForId(expr->ReturnId(), BailoutState::TOS_REGISTER); 2431 PrepareForBailoutForId(expr->ReturnId(), BailoutState::TOS_REGISTER);
2432 RestoreContext(); 2432 RestoreContext();
2433 context()->Plug(eax); 2433 context()->Plug(eax);
2434 } 2434 }
2435 2435
2436 2436
2437 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { 2437 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
2438 SuperCallReference* super_call_ref = 2438 SuperCallReference* super_call_ref =
2439 expr->expression()->AsSuperCallReference(); 2439 expr->expression()->AsSuperCallReference();
(...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
3520 isolate->builtins()->OnStackReplacement()->entry(), 3520 isolate->builtins()->OnStackReplacement()->entry(),
3521 Assembler::target_address_at(call_target_address, unoptimized_code)); 3521 Assembler::target_address_at(call_target_address, unoptimized_code));
3522 return ON_STACK_REPLACEMENT; 3522 return ON_STACK_REPLACEMENT;
3523 } 3523 }
3524 3524
3525 3525
3526 } // namespace internal 3526 } // namespace internal
3527 } // namespace v8 3527 } // namespace v8
3528 3528
3529 #endif // V8_TARGET_ARCH_X87 3529 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698