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_ARM | 5 #if V8_TARGET_ARCH_ARM |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1826 STATIC_ASSERT(JSGeneratorObject::kNext < JSGeneratorObject::kReturn); | 1826 STATIC_ASSERT(JSGeneratorObject::kNext < JSGeneratorObject::kReturn); |
1827 STATIC_ASSERT(JSGeneratorObject::kThrow > JSGeneratorObject::kReturn); | 1827 STATIC_ASSERT(JSGeneratorObject::kThrow > JSGeneratorObject::kReturn); |
1828 __ cmp(r1, Operand(Smi::FromInt(JSGeneratorObject::kReturn))); | 1828 __ cmp(r1, Operand(Smi::FromInt(JSGeneratorObject::kReturn))); |
1829 __ b(lt, &resume); | 1829 __ b(lt, &resume); |
1830 __ Push(result_register()); | 1830 __ Push(result_register()); |
1831 __ b(gt, &exception); | 1831 __ b(gt, &exception); |
1832 EmitCreateIteratorResult(true); | 1832 EmitCreateIteratorResult(true); |
1833 EmitUnwindAndReturn(); | 1833 EmitUnwindAndReturn(); |
1834 | 1834 |
1835 __ bind(&exception); | 1835 __ bind(&exception); |
1836 __ CallRuntime(Runtime::kThrow); | 1836 __ CallRuntime(expr->rethrow_on_exception() ? Runtime::kReThrow |
| 1837 : Runtime::kThrow); |
1837 | 1838 |
1838 __ bind(&suspend); | 1839 __ bind(&suspend); |
1839 OperandStackDepthIncrement(1); // Not popped on this path. | 1840 OperandStackDepthIncrement(1); // Not popped on this path. |
1840 VisitForAccumulatorValue(expr->generator_object()); | 1841 VisitForAccumulatorValue(expr->generator_object()); |
1841 DCHECK(continuation.pos() > 0 && Smi::IsValid(continuation.pos())); | 1842 DCHECK(continuation.pos() > 0 && Smi::IsValid(continuation.pos())); |
1842 __ mov(r1, Operand(Smi::FromInt(continuation.pos()))); | 1843 __ mov(r1, Operand(Smi::FromInt(continuation.pos()))); |
1843 __ str(r1, FieldMemOperand(r0, JSGeneratorObject::kContinuationOffset)); | 1844 __ str(r1, FieldMemOperand(r0, JSGeneratorObject::kContinuationOffset)); |
1844 __ str(cp, FieldMemOperand(r0, JSGeneratorObject::kContextOffset)); | 1845 __ str(cp, FieldMemOperand(r0, JSGeneratorObject::kContextOffset)); |
1845 __ mov(r1, cp); | 1846 __ mov(r1, cp); |
1846 __ RecordWriteField(r0, JSGeneratorObject::kContextOffset, r1, r2, | 1847 __ RecordWriteField(r0, JSGeneratorObject::kContextOffset, r1, r2, |
(...skipping 1992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3839 DCHECK(interrupt_address == | 3840 DCHECK(interrupt_address == |
3840 isolate->builtins()->OnStackReplacement()->entry()); | 3841 isolate->builtins()->OnStackReplacement()->entry()); |
3841 return ON_STACK_REPLACEMENT; | 3842 return ON_STACK_REPLACEMENT; |
3842 } | 3843 } |
3843 | 3844 |
3844 | 3845 |
3845 } // namespace internal | 3846 } // namespace internal |
3846 } // namespace v8 | 3847 } // namespace v8 |
3847 | 3848 |
3848 #endif // V8_TARGET_ARCH_ARM | 3849 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |