| 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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 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 1806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1817 // this. It stays on the stack while we update the iterator. | 1817 // this. It stays on the stack while we update the iterator. |
| 1818 VisitForStackValue(expr->expression()); | 1818 VisitForStackValue(expr->expression()); |
| 1819 | 1819 |
| 1820 Label suspend, continuation, post_runtime, resume, exception; | 1820 Label suspend, continuation, post_runtime, resume, exception; |
| 1821 | 1821 |
| 1822 __ jmp(&suspend); | 1822 __ jmp(&suspend); |
| 1823 __ bind(&continuation); | 1823 __ bind(&continuation); |
| 1824 // When we arrive here, v0 holds the generator object. | 1824 // When we arrive here, v0 holds the generator object. |
| 1825 __ RecordGeneratorContinuation(); | 1825 __ RecordGeneratorContinuation(); |
| 1826 __ ld(a1, FieldMemOperand(v0, JSGeneratorObject::kResumeModeOffset)); | 1826 __ ld(a1, FieldMemOperand(v0, JSGeneratorObject::kResumeModeOffset)); |
| 1827 __ ld(v0, FieldMemOperand(v0, JSGeneratorObject::kInputOffset)); | 1827 __ ld(v0, FieldMemOperand(v0, JSGeneratorObject::kInputOrDebugPosOffset)); |
| 1828 __ Branch(&resume, eq, a1, Operand(Smi::FromInt(JSGeneratorObject::kNext))); | 1828 __ Branch(&resume, eq, a1, Operand(Smi::FromInt(JSGeneratorObject::kNext))); |
| 1829 __ Push(result_register()); | 1829 __ Push(result_register()); |
| 1830 __ Branch(&exception, eq, a1, | 1830 __ Branch(&exception, eq, a1, |
| 1831 Operand(Smi::FromInt(JSGeneratorObject::kThrow))); | 1831 Operand(Smi::FromInt(JSGeneratorObject::kThrow))); |
| 1832 EmitCreateIteratorResult(true); | 1832 EmitCreateIteratorResult(true); |
| 1833 EmitUnwindAndReturn(); | 1833 EmitUnwindAndReturn(); |
| 1834 | 1834 |
| 1835 __ bind(&exception); | 1835 __ bind(&exception); |
| 1836 __ CallRuntime(Runtime::kThrow); | 1836 __ CallRuntime(Runtime::kThrow); |
| 1837 | 1837 |
| (...skipping 1973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3811 reinterpret_cast<uint64_t>( | 3811 reinterpret_cast<uint64_t>( |
| 3812 isolate->builtins()->OnStackReplacement()->entry())); | 3812 isolate->builtins()->OnStackReplacement()->entry())); |
| 3813 return ON_STACK_REPLACEMENT; | 3813 return ON_STACK_REPLACEMENT; |
| 3814 } | 3814 } |
| 3815 | 3815 |
| 3816 | 3816 |
| 3817 } // namespace internal | 3817 } // namespace internal |
| 3818 } // namespace v8 | 3818 } // namespace v8 |
| 3819 | 3819 |
| 3820 #endif // V8_TARGET_ARCH_MIPS64 | 3820 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |