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/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/builtins/builtins-constructor.h" | 9 #include "src/builtins/builtins-constructor.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 1789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1800 SetCallPosition(expr, expr->tail_call_mode()); | 1800 SetCallPosition(expr, expr->tail_call_mode()); |
1801 if (expr->tail_call_mode() == TailCallMode::kAllow) { | 1801 if (expr->tail_call_mode() == TailCallMode::kAllow) { |
1802 if (FLAG_trace) { | 1802 if (FLAG_trace) { |
1803 __ CallRuntime(Runtime::kTraceTailCall); | 1803 __ CallRuntime(Runtime::kTraceTailCall); |
1804 } | 1804 } |
1805 // Update profiling counters before the tail call since we will | 1805 // Update profiling counters before the tail call since we will |
1806 // not return to this function. | 1806 // not return to this function. |
1807 EmitProfilingCounterHandlingForReturnSequence(true); | 1807 EmitProfilingCounterHandlingForReturnSequence(true); |
1808 } | 1808 } |
1809 Handle<Code> code = | 1809 Handle<Code> code = |
1810 CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code(); | 1810 CodeFactory::CallICTrampoline(isolate(), mode, expr->tail_call_mode()) |
| 1811 .code(); |
1811 __ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot()))); | 1812 __ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot()))); |
1812 __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); | 1813 __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); |
1813 __ Move(eax, Immediate(arg_count)); | 1814 __ Move(eax, Immediate(arg_count)); |
1814 CallIC(code); | 1815 CallIC(code); |
1815 OperandStackDepthDecrement(arg_count + 1); | 1816 OperandStackDepthDecrement(arg_count + 1); |
1816 | 1817 |
1817 RecordJSReturnSite(expr); | 1818 RecordJSReturnSite(expr); |
1818 RestoreContext(); | 1819 RestoreContext(); |
1819 context()->DropAndPlug(1, eax); | 1820 context()->DropAndPlug(1, eax); |
1820 } | 1821 } |
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2772 isolate->builtins()->OnStackReplacement()->entry(), | 2773 isolate->builtins()->OnStackReplacement()->entry(), |
2773 Assembler::target_address_at(call_target_address, unoptimized_code)); | 2774 Assembler::target_address_at(call_target_address, unoptimized_code)); |
2774 return ON_STACK_REPLACEMENT; | 2775 return ON_STACK_REPLACEMENT; |
2775 } | 2776 } |
2776 | 2777 |
2777 | 2778 |
2778 } // namespace internal | 2779 } // namespace internal |
2779 } // namespace v8 | 2780 } // namespace v8 |
2780 | 2781 |
2781 #endif // V8_TARGET_ARCH_X87 | 2782 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |