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 2724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2735 void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { | 2735 void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { |
2736 // Load the arguments. | 2736 // Load the arguments. |
2737 ZoneList<Expression*>* args = expr->arguments(); | 2737 ZoneList<Expression*>* args = expr->arguments(); |
2738 int arg_count = args->length(); | 2738 int arg_count = args->length(); |
2739 for (int i = 0; i < arg_count; i++) { | 2739 for (int i = 0; i < arg_count; i++) { |
2740 VisitForStackValue(args->at(i)); | 2740 VisitForStackValue(args->at(i)); |
2741 } | 2741 } |
2742 | 2742 |
2743 PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); | 2743 PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); |
2744 SetCallPosition(expr); | 2744 SetCallPosition(expr); |
2745 Handle<Code> ic = CodeFactory::CallIC(isolate(), arg_count, mode).code(); | 2745 TailCallMode tail_call_mode = |
| 2746 expr->is_tail() ? TailCallMode::kAllow : TailCallMode::kDisallow; |
| 2747 Handle<Code> ic = |
| 2748 CodeFactory::CallIC(isolate(), arg_count, mode, tail_call_mode).code(); |
2746 __ Move(rdx, SmiFromSlot(expr->CallFeedbackICSlot())); | 2749 __ Move(rdx, SmiFromSlot(expr->CallFeedbackICSlot())); |
2747 __ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); | 2750 __ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); |
2748 // Don't assign a type feedback id to the IC, since type feedback is provided | 2751 // Don't assign a type feedback id to the IC, since type feedback is provided |
2749 // by the vector above. | 2752 // by the vector above. |
2750 CallIC(ic); | 2753 CallIC(ic); |
2751 | 2754 |
2752 RecordJSReturnSite(expr); | 2755 RecordJSReturnSite(expr); |
2753 | 2756 |
2754 // Restore context register. | 2757 // Restore context register. |
2755 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 2758 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
(...skipping 1990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4746 Assembler::target_address_at(call_target_address, | 4749 Assembler::target_address_at(call_target_address, |
4747 unoptimized_code)); | 4750 unoptimized_code)); |
4748 return OSR_AFTER_STACK_CHECK; | 4751 return OSR_AFTER_STACK_CHECK; |
4749 } | 4752 } |
4750 | 4753 |
4751 | 4754 |
4752 } // namespace internal | 4755 } // namespace internal |
4753 } // namespace v8 | 4756 } // namespace v8 |
4754 | 4757 |
4755 #endif // V8_TARGET_ARCH_X64 | 4758 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |