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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
6 | 6 |
7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
8 // | 8 // |
9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
(...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1905 SetCallPosition(expr, expr->tail_call_mode()); | 1905 SetCallPosition(expr, expr->tail_call_mode()); |
1906 if (expr->tail_call_mode() == TailCallMode::kAllow) { | 1906 if (expr->tail_call_mode() == TailCallMode::kAllow) { |
1907 if (FLAG_trace) { | 1907 if (FLAG_trace) { |
1908 __ CallRuntime(Runtime::kTraceTailCall); | 1908 __ CallRuntime(Runtime::kTraceTailCall); |
1909 } | 1909 } |
1910 // Update profiling counters before the tail call since we will | 1910 // Update profiling counters before the tail call since we will |
1911 // not return to this function. | 1911 // not return to this function. |
1912 EmitProfilingCounterHandlingForReturnSequence(true); | 1912 EmitProfilingCounterHandlingForReturnSequence(true); |
1913 } | 1913 } |
1914 Handle<Code> code = | 1914 Handle<Code> code = |
1915 CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code(); | 1915 CodeFactory::CallICTrampoline(isolate(), mode, expr->tail_call_mode()) |
| 1916 .code(); |
1916 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot()))); | 1917 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot()))); |
1917 __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); | 1918 __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); |
1918 __ li(a0, Operand(arg_count)); | 1919 __ li(a0, Operand(arg_count)); |
1919 CallIC(code); | 1920 CallIC(code); |
1920 OperandStackDepthDecrement(arg_count + 1); | 1921 OperandStackDepthDecrement(arg_count + 1); |
1921 | 1922 |
1922 RecordJSReturnSite(expr); | 1923 RecordJSReturnSite(expr); |
1923 RestoreContext(); | 1924 RestoreContext(); |
1924 context()->DropAndPlug(1, v0); | 1925 context()->DropAndPlug(1, v0); |
1925 } | 1926 } |
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2868 reinterpret_cast<uint32_t>( | 2869 reinterpret_cast<uint32_t>( |
2869 isolate->builtins()->OnStackReplacement()->entry())); | 2870 isolate->builtins()->OnStackReplacement()->entry())); |
2870 return ON_STACK_REPLACEMENT; | 2871 return ON_STACK_REPLACEMENT; |
2871 } | 2872 } |
2872 | 2873 |
2873 | 2874 |
2874 } // namespace internal | 2875 } // namespace internal |
2875 } // namespace v8 | 2876 } // namespace v8 |
2876 | 2877 |
2877 #endif // V8_TARGET_ARCH_MIPS | 2878 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |