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_X64 | 5 #if V8_TARGET_ARCH_X64 |
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 2495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2506 | 2506 |
2507 void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { | 2507 void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { |
2508 // Load the arguments. | 2508 // Load the arguments. |
2509 ZoneList<Expression*>* args = expr->arguments(); | 2509 ZoneList<Expression*>* args = expr->arguments(); |
2510 int arg_count = args->length(); | 2510 int arg_count = args->length(); |
2511 for (int i = 0; i < arg_count; i++) { | 2511 for (int i = 0; i < arg_count; i++) { |
2512 VisitForStackValue(args->at(i)); | 2512 VisitForStackValue(args->at(i)); |
2513 } | 2513 } |
2514 | 2514 |
2515 PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); | 2515 PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); |
2516 SetCallPosition(expr); | 2516 SetCallPosition(expr, expr->tail_call_mode()); |
2517 if (expr->tail_call_mode() == TailCallMode::kAllow) { | 2517 if (expr->tail_call_mode() == TailCallMode::kAllow) { |
2518 if (FLAG_trace) { | 2518 if (FLAG_trace) { |
2519 __ CallRuntime(Runtime::kTraceTailCall); | 2519 __ CallRuntime(Runtime::kTraceTailCall); |
2520 } | 2520 } |
2521 // Update profiling counters before the tail call since we will | 2521 // Update profiling counters before the tail call since we will |
2522 // not return to this function. | 2522 // not return to this function. |
2523 EmitProfilingCounterHandlingForReturnSequence(true); | 2523 EmitProfilingCounterHandlingForReturnSequence(true); |
2524 } | 2524 } |
2525 Handle<Code> ic = | 2525 Handle<Code> ic = |
2526 CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode()) | 2526 CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode()) |
(...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3970 DCHECK_EQ( | 3970 DCHECK_EQ( |
3971 isolate->builtins()->OnStackReplacement()->entry(), | 3971 isolate->builtins()->OnStackReplacement()->entry(), |
3972 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3972 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3973 return ON_STACK_REPLACEMENT; | 3973 return ON_STACK_REPLACEMENT; |
3974 } | 3974 } |
3975 | 3975 |
3976 } // namespace internal | 3976 } // namespace internal |
3977 } // namespace v8 | 3977 } // namespace v8 |
3978 | 3978 |
3979 #endif // V8_TARGET_ARCH_X64 | 3979 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |