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 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 __ GetObjectType(a0, a1, a1); | 994 __ GetObjectType(a0, a1, a1); |
995 __ Branch(USE_DELAY_SLOT, &done_convert, ge, a1, | 995 __ Branch(USE_DELAY_SLOT, &done_convert, ge, a1, |
996 Operand(FIRST_JS_RECEIVER_TYPE)); | 996 Operand(FIRST_JS_RECEIVER_TYPE)); |
997 __ LoadRoot(at, Heap::kNullValueRootIndex); // In delay slot. | 997 __ LoadRoot(at, Heap::kNullValueRootIndex); // In delay slot. |
998 __ Branch(USE_DELAY_SLOT, &exit, eq, a0, Operand(at)); | 998 __ Branch(USE_DELAY_SLOT, &exit, eq, a0, Operand(at)); |
999 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); // In delay slot. | 999 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); // In delay slot. |
1000 __ Branch(&exit, eq, a0, Operand(at)); | 1000 __ Branch(&exit, eq, a0, Operand(at)); |
1001 __ bind(&convert); | 1001 __ bind(&convert); |
1002 ToObjectStub stub(isolate()); | 1002 ToObjectStub stub(isolate()); |
1003 __ CallStub(&stub); | 1003 __ CallStub(&stub); |
| 1004 RestoreContext(); |
1004 __ mov(a0, v0); | 1005 __ mov(a0, v0); |
1005 __ bind(&done_convert); | 1006 __ bind(&done_convert); |
1006 PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER); | 1007 PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER); |
1007 __ push(a0); | 1008 __ push(a0); |
1008 | 1009 |
1009 // Check cache validity in generated code. If we cannot guarantee cache | 1010 // Check cache validity in generated code. If we cannot guarantee cache |
1010 // validity, call the runtime system to check cache validity or get the | 1011 // validity, call the runtime system to check cache validity or get the |
1011 // property names in a fixed array. Note: Proxies never have an enum cache, | 1012 // property names in a fixed array. Note: Proxies never have an enum cache, |
1012 // so will always take the slow path. | 1013 // so will always take the slow path. |
1013 Label call_runtime; | 1014 Label call_runtime; |
(...skipping 2764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3778 reinterpret_cast<uint32_t>( | 3779 reinterpret_cast<uint32_t>( |
3779 isolate->builtins()->OnStackReplacement()->entry())); | 3780 isolate->builtins()->OnStackReplacement()->entry())); |
3780 return ON_STACK_REPLACEMENT; | 3781 return ON_STACK_REPLACEMENT; |
3781 } | 3782 } |
3782 | 3783 |
3783 | 3784 |
3784 } // namespace internal | 3785 } // namespace internal |
3785 } // namespace v8 | 3786 } // namespace v8 |
3786 | 3787 |
3787 #endif // V8_TARGET_ARCH_MIPS | 3788 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |