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 3804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3815 // Load the argument into a0 and convert it. | 3815 // Load the argument into a0 and convert it. |
3816 VisitForAccumulatorValue(args->at(0)); | 3816 VisitForAccumulatorValue(args->at(0)); |
3817 __ mov(a0, result_register()); | 3817 __ mov(a0, result_register()); |
3818 | 3818 |
3819 ToStringStub stub(isolate()); | 3819 ToStringStub stub(isolate()); |
3820 __ CallStub(&stub); | 3820 __ CallStub(&stub); |
3821 context()->Plug(v0); | 3821 context()->Plug(v0); |
3822 } | 3822 } |
3823 | 3823 |
3824 | 3824 |
| 3825 void FullCodeGenerator::EmitToNumber(CallRuntime* expr) { |
| 3826 ZoneList<Expression*>* args = expr->arguments(); |
| 3827 DCHECK_EQ(1, args->length()); |
| 3828 |
| 3829 // Load the argument into a0 and convert it. |
| 3830 VisitForAccumulatorValue(args->at(0)); |
| 3831 __ mov(a0, result_register()); |
| 3832 |
| 3833 ToNumberStub stub(isolate()); |
| 3834 __ CallStub(&stub); |
| 3835 context()->Plug(v0); |
| 3836 } |
| 3837 |
| 3838 |
3825 void FullCodeGenerator::EmitToName(CallRuntime* expr) { | 3839 void FullCodeGenerator::EmitToName(CallRuntime* expr) { |
3826 ZoneList<Expression*>* args = expr->arguments(); | 3840 ZoneList<Expression*>* args = expr->arguments(); |
3827 DCHECK_EQ(1, args->length()); | 3841 DCHECK_EQ(1, args->length()); |
3828 | 3842 |
3829 // Load the argument into v0 and convert it. | 3843 // Load the argument into v0 and convert it. |
3830 VisitForAccumulatorValue(args->at(0)); | 3844 VisitForAccumulatorValue(args->at(0)); |
3831 | 3845 |
3832 Label convert, done_convert; | 3846 Label convert, done_convert; |
3833 __ JumpIfSmi(v0, &convert); | 3847 __ JumpIfSmi(v0, &convert); |
3834 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE); | 3848 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE); |
(...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5239 reinterpret_cast<uint32_t>( | 5253 reinterpret_cast<uint32_t>( |
5240 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5254 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5241 return OSR_AFTER_STACK_CHECK; | 5255 return OSR_AFTER_STACK_CHECK; |
5242 } | 5256 } |
5243 | 5257 |
5244 | 5258 |
5245 } // namespace internal | 5259 } // namespace internal |
5246 } // namespace v8 | 5260 } // namespace v8 |
5247 | 5261 |
5248 #endif // V8_TARGET_ARCH_MIPS | 5262 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |