| 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_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 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 2726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2737 void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { | 2737 void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { |
| 2738 // Load the arguments. | 2738 // Load the arguments. |
| 2739 ZoneList<Expression*>* args = expr->arguments(); | 2739 ZoneList<Expression*>* args = expr->arguments(); |
| 2740 int arg_count = args->length(); | 2740 int arg_count = args->length(); |
| 2741 for (int i = 0; i < arg_count; i++) { | 2741 for (int i = 0; i < arg_count; i++) { |
| 2742 VisitForStackValue(args->at(i)); | 2742 VisitForStackValue(args->at(i)); |
| 2743 } | 2743 } |
| 2744 | 2744 |
| 2745 PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); | 2745 PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); |
| 2746 SetCallPosition(expr); | 2746 SetCallPosition(expr); |
| 2747 Handle<Code> ic = CodeFactory::CallIC(isolate(), arg_count, mode).code(); | 2747 Handle<Code> ic = |
| 2748 CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode()) |
| 2749 .code(); |
| 2748 __ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot()))); | 2750 __ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot()))); |
| 2749 __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); | 2751 __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); |
| 2750 // Don't assign a type feedback id to the IC, since type feedback is provided | 2752 // Don't assign a type feedback id to the IC, since type feedback is provided |
| 2751 // by the vector above. | 2753 // by the vector above. |
| 2752 CallIC(ic); | 2754 CallIC(ic); |
| 2753 | 2755 |
| 2754 RecordJSReturnSite(expr); | 2756 RecordJSReturnSite(expr); |
| 2755 | 2757 |
| 2756 // Restore context register. | 2758 // Restore context register. |
| 2757 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 2759 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
| (...skipping 1952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4710 Assembler::target_address_at(call_target_address, | 4712 Assembler::target_address_at(call_target_address, |
| 4711 unoptimized_code)); | 4713 unoptimized_code)); |
| 4712 return OSR_AFTER_STACK_CHECK; | 4714 return OSR_AFTER_STACK_CHECK; |
| 4713 } | 4715 } |
| 4714 | 4716 |
| 4715 | 4717 |
| 4716 } // namespace internal | 4718 } // namespace internal |
| 4717 } // namespace v8 | 4719 } // namespace v8 |
| 4718 | 4720 |
| 4719 #endif // V8_TARGET_ARCH_X87 | 4721 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |