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 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
992 Label convert, done_convert; | 992 Label convert, done_convert; |
993 __ JumpIfSmi(a0, &convert); | 993 __ JumpIfSmi(a0, &convert); |
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 __ Push(cp); |
1002 ToObjectStub stub(isolate()); | 1003 ToObjectStub stub(isolate()); |
1003 __ CallStub(&stub); | 1004 __ CallStub(&stub); |
| 1005 __ Pop(cp); |
1004 __ mov(a0, v0); | 1006 __ mov(a0, v0); |
1005 __ bind(&done_convert); | 1007 __ bind(&done_convert); |
1006 PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER); | 1008 PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER); |
1007 __ push(a0); | 1009 __ push(a0); |
1008 | 1010 |
1009 // Check cache validity in generated code. If we cannot guarantee cache | 1011 // Check cache validity in generated code. If we cannot guarantee cache |
1010 // validity, call the runtime system to check cache validity or get the | 1012 // 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, | 1013 // property names in a fixed array. Note: Proxies never have an enum cache, |
1012 // so will always take the slow path. | 1014 // so will always take the slow path. |
1013 Label call_runtime; | 1015 Label call_runtime; |
(...skipping 2764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3778 reinterpret_cast<uint32_t>( | 3780 reinterpret_cast<uint32_t>( |
3779 isolate->builtins()->OnStackReplacement()->entry())); | 3781 isolate->builtins()->OnStackReplacement()->entry())); |
3780 return ON_STACK_REPLACEMENT; | 3782 return ON_STACK_REPLACEMENT; |
3781 } | 3783 } |
3782 | 3784 |
3783 | 3785 |
3784 } // namespace internal | 3786 } // namespace internal |
3785 } // namespace v8 | 3787 } // namespace v8 |
3786 | 3788 |
3787 #endif // V8_TARGET_ARCH_MIPS | 3789 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |