| 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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 2505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2516 | 2516 |
| 2517 void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { | 2517 void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { |
| 2518 // Load the arguments. | 2518 // Load the arguments. |
| 2519 ZoneList<Expression*>* args = expr->arguments(); | 2519 ZoneList<Expression*>* args = expr->arguments(); |
| 2520 int arg_count = args->length(); | 2520 int arg_count = args->length(); |
| 2521 for (int i = 0; i < arg_count; i++) { | 2521 for (int i = 0; i < arg_count; i++) { |
| 2522 VisitForStackValue(args->at(i)); | 2522 VisitForStackValue(args->at(i)); |
| 2523 } | 2523 } |
| 2524 | 2524 |
| 2525 PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); | 2525 PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); |
| 2526 SetCallPosition(expr); | 2526 SetCallPosition(expr, expr->tail_call_mode()); |
| 2527 if (expr->tail_call_mode() == TailCallMode::kAllow) { | 2527 if (expr->tail_call_mode() == TailCallMode::kAllow) { |
| 2528 if (FLAG_trace) { | 2528 if (FLAG_trace) { |
| 2529 __ CallRuntime(Runtime::kTraceTailCall); | 2529 __ CallRuntime(Runtime::kTraceTailCall); |
| 2530 } | 2530 } |
| 2531 // Update profiling counters before the tail call since we will | 2531 // Update profiling counters before the tail call since we will |
| 2532 // not return to this function. | 2532 // not return to this function. |
| 2533 EmitProfilingCounterHandlingForReturnSequence(true); | 2533 EmitProfilingCounterHandlingForReturnSequence(true); |
| 2534 } | 2534 } |
| 2535 Handle<Code> ic = | 2535 Handle<Code> ic = |
| 2536 CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode()) | 2536 CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode()) |
| (...skipping 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3985 isolate->builtins()->OnStackReplacement()->entry(), | 3985 isolate->builtins()->OnStackReplacement()->entry(), |
| 3986 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3986 Assembler::target_address_at(call_target_address, unoptimized_code)); |
| 3987 return ON_STACK_REPLACEMENT; | 3987 return ON_STACK_REPLACEMENT; |
| 3988 } | 3988 } |
| 3989 | 3989 |
| 3990 | 3990 |
| 3991 } // namespace internal | 3991 } // namespace internal |
| 3992 } // namespace v8 | 3992 } // namespace v8 |
| 3993 | 3993 |
| 3994 #endif // V8_TARGET_ARCH_IA32 | 3994 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |