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 2734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2745 void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { | 2745 void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { |
2746 // Load the arguments. | 2746 // Load the arguments. |
2747 ZoneList<Expression*>* args = expr->arguments(); | 2747 ZoneList<Expression*>* args = expr->arguments(); |
2748 int arg_count = args->length(); | 2748 int arg_count = args->length(); |
2749 for (int i = 0; i < arg_count; i++) { | 2749 for (int i = 0; i < arg_count; i++) { |
2750 VisitForStackValue(args->at(i)); | 2750 VisitForStackValue(args->at(i)); |
2751 } | 2751 } |
2752 | 2752 |
2753 PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); | 2753 PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); |
2754 SetCallPosition(expr); | 2754 SetCallPosition(expr); |
2755 Handle<Code> ic = CodeFactory::CallIC(isolate(), arg_count, mode).code(); | 2755 Handle<Code> ic = |
| 2756 CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode()) |
| 2757 .code(); |
2756 __ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot()))); | 2758 __ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot()))); |
2757 __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); | 2759 __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); |
2758 // Don't assign a type feedback id to the IC, since type feedback is provided | 2760 // Don't assign a type feedback id to the IC, since type feedback is provided |
2759 // by the vector above. | 2761 // by the vector above. |
2760 CallIC(ic); | 2762 CallIC(ic); |
2761 | 2763 |
2762 RecordJSReturnSite(expr); | 2764 RecordJSReturnSite(expr); |
2763 | 2765 |
2764 // Restore context register. | 2766 // Restore context register. |
2765 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 2767 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
(...skipping 1952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4718 Assembler::target_address_at(call_target_address, | 4720 Assembler::target_address_at(call_target_address, |
4719 unoptimized_code)); | 4721 unoptimized_code)); |
4720 return OSR_AFTER_STACK_CHECK; | 4722 return OSR_AFTER_STACK_CHECK; |
4721 } | 4723 } |
4722 | 4724 |
4723 | 4725 |
4724 } // namespace internal | 4726 } // namespace internal |
4725 } // namespace v8 | 4727 } // namespace v8 |
4726 | 4728 |
4727 #endif // V8_TARGET_ARCH_IA32 | 4729 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |