| OLD | NEW |
| 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 2271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2282 } | 2282 } |
| 2283 // Update profiling counters before the tail call since we will | 2283 // Update profiling counters before the tail call since we will |
| 2284 // not return to this function. | 2284 // not return to this function. |
| 2285 EmitProfilingCounterHandlingForReturnSequence(true); | 2285 EmitProfilingCounterHandlingForReturnSequence(true); |
| 2286 } | 2286 } |
| 2287 Handle<Code> code = | 2287 Handle<Code> code = |
| 2288 CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code(); | 2288 CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code(); |
| 2289 __ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot()))); | 2289 __ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot()))); |
| 2290 __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); | 2290 __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); |
| 2291 __ Move(eax, Immediate(arg_count)); | 2291 __ Move(eax, Immediate(arg_count)); |
| 2292 __ call(code, RelocInfo::CODE_TARGET); | 2292 CallIC(code); |
| 2293 OperandStackDepthDecrement(arg_count + 1); | 2293 OperandStackDepthDecrement(arg_count + 1); |
| 2294 | 2294 |
| 2295 RecordJSReturnSite(expr); | 2295 RecordJSReturnSite(expr); |
| 2296 RestoreContext(); | 2296 RestoreContext(); |
| 2297 context()->DropAndPlug(1, eax); | 2297 context()->DropAndPlug(1, eax); |
| 2298 } | 2298 } |
| 2299 | 2299 |
| 2300 void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) { | 2300 void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) { |
| 2301 int arg_count = expr->arguments()->length(); | 2301 int arg_count = expr->arguments()->length(); |
| 2302 // Push copy of the first argument or undefined if it doesn't exist. | 2302 // 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 Loading... |
| 2427 | 2427 |
| 2428 // Load function and argument count into edi and eax. | 2428 // Load function and argument count into edi and eax. |
| 2429 __ Move(eax, Immediate(arg_count)); | 2429 __ Move(eax, Immediate(arg_count)); |
| 2430 __ mov(edi, Operand(esp, arg_count * kPointerSize)); | 2430 __ mov(edi, Operand(esp, arg_count * kPointerSize)); |
| 2431 | 2431 |
| 2432 // Record call targets in unoptimized code. | 2432 // Record call targets in unoptimized code. |
| 2433 __ EmitLoadTypeFeedbackVector(ebx); | 2433 __ EmitLoadTypeFeedbackVector(ebx); |
| 2434 __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot()))); | 2434 __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot()))); |
| 2435 | 2435 |
| 2436 CallConstructStub stub(isolate()); | 2436 CallConstructStub stub(isolate()); |
| 2437 __ call(stub.GetCode(), RelocInfo::CODE_TARGET); | 2437 CallIC(stub.GetCode()); |
| 2438 OperandStackDepthDecrement(arg_count + 1); | 2438 OperandStackDepthDecrement(arg_count + 1); |
| 2439 PrepareForBailoutForId(expr->ReturnId(), BailoutState::TOS_REGISTER); | 2439 PrepareForBailoutForId(expr->ReturnId(), BailoutState::TOS_REGISTER); |
| 2440 RestoreContext(); | 2440 RestoreContext(); |
| 2441 context()->Plug(eax); | 2441 context()->Plug(eax); |
| 2442 } | 2442 } |
| 2443 | 2443 |
| 2444 | 2444 |
| 2445 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { | 2445 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
| 2446 SuperCallReference* super_call_ref = | 2446 SuperCallReference* super_call_ref = |
| 2447 expr->expression()->AsSuperCallReference(); | 2447 expr->expression()->AsSuperCallReference(); |
| (...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3528 isolate->builtins()->OnStackReplacement()->entry(), | 3528 isolate->builtins()->OnStackReplacement()->entry(), |
| 3529 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3529 Assembler::target_address_at(call_target_address, unoptimized_code)); |
| 3530 return ON_STACK_REPLACEMENT; | 3530 return ON_STACK_REPLACEMENT; |
| 3531 } | 3531 } |
| 3532 | 3532 |
| 3533 | 3533 |
| 3534 } // namespace internal | 3534 } // namespace internal |
| 3535 } // namespace v8 | 3535 } // namespace v8 |
| 3536 | 3536 |
| 3537 #endif // V8_TARGET_ARCH_IA32 | 3537 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |