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 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1819 __ lw(a1, FieldMemOperand(v0, JSGeneratorObject::kResumeModeOffset)); | 1819 __ lw(a1, FieldMemOperand(v0, JSGeneratorObject::kResumeModeOffset)); |
1820 __ lw(v0, FieldMemOperand(v0, JSGeneratorObject::kInputOrDebugPosOffset)); | 1820 __ lw(v0, FieldMemOperand(v0, JSGeneratorObject::kInputOrDebugPosOffset)); |
1821 __ Branch(&resume, eq, a1, Operand(Smi::FromInt(JSGeneratorObject::kNext))); | 1821 __ Branch(&resume, eq, a1, Operand(Smi::FromInt(JSGeneratorObject::kNext))); |
1822 __ Push(result_register()); | 1822 __ Push(result_register()); |
1823 __ Branch(&exception, eq, a1, | 1823 __ Branch(&exception, eq, a1, |
1824 Operand(Smi::FromInt(JSGeneratorObject::kThrow))); | 1824 Operand(Smi::FromInt(JSGeneratorObject::kThrow))); |
1825 EmitCreateIteratorResult(true); | 1825 EmitCreateIteratorResult(true); |
1826 EmitUnwindAndReturn(); | 1826 EmitUnwindAndReturn(); |
1827 | 1827 |
1828 __ bind(&exception); | 1828 __ bind(&exception); |
1829 __ CallRuntime(Runtime::kThrow); | 1829 __ CallRuntime(expr->rethrow_on_exception() ? Runtime::kReThrow |
| 1830 : Runtime::kThrow); |
1830 | 1831 |
1831 __ bind(&suspend); | 1832 __ bind(&suspend); |
1832 OperandStackDepthIncrement(1); // Not popped on this path. | 1833 OperandStackDepthIncrement(1); // Not popped on this path. |
1833 VisitForAccumulatorValue(expr->generator_object()); | 1834 VisitForAccumulatorValue(expr->generator_object()); |
1834 DCHECK(continuation.pos() > 0 && Smi::IsValid(continuation.pos())); | 1835 DCHECK(continuation.pos() > 0 && Smi::IsValid(continuation.pos())); |
1835 __ li(a1, Operand(Smi::FromInt(continuation.pos()))); | 1836 __ li(a1, Operand(Smi::FromInt(continuation.pos()))); |
1836 __ sw(a1, FieldMemOperand(v0, JSGeneratorObject::kContinuationOffset)); | 1837 __ sw(a1, FieldMemOperand(v0, JSGeneratorObject::kContinuationOffset)); |
1837 __ sw(cp, FieldMemOperand(v0, JSGeneratorObject::kContextOffset)); | 1838 __ sw(cp, FieldMemOperand(v0, JSGeneratorObject::kContextOffset)); |
1838 __ mov(a1, cp); | 1839 __ mov(a1, cp); |
1839 __ RecordWriteField(v0, JSGeneratorObject::kContextOffset, a1, a2, | 1840 __ RecordWriteField(v0, JSGeneratorObject::kContextOffset, a1, a2, |
(...skipping 1940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3780 reinterpret_cast<uint32_t>( | 3781 reinterpret_cast<uint32_t>( |
3781 isolate->builtins()->OnStackReplacement()->entry())); | 3782 isolate->builtins()->OnStackReplacement()->entry())); |
3782 return ON_STACK_REPLACEMENT; | 3783 return ON_STACK_REPLACEMENT; |
3783 } | 3784 } |
3784 | 3785 |
3785 | 3786 |
3786 } // namespace internal | 3787 } // namespace internal |
3787 } // namespace v8 | 3788 } // namespace v8 |
3788 | 3789 |
3789 #endif // V8_TARGET_ARCH_MIPS | 3790 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |