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 1810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1821 // this. It stays on the stack while we update the iterator. | 1821 // this. It stays on the stack while we update the iterator. |
1822 VisitForStackValue(expr->expression()); | 1822 VisitForStackValue(expr->expression()); |
1823 | 1823 |
1824 Label suspend, continuation, post_runtime, resume, exception; | 1824 Label suspend, continuation, post_runtime, resume, exception; |
1825 | 1825 |
1826 __ jmp(&suspend); | 1826 __ jmp(&suspend); |
1827 __ bind(&continuation); | 1827 __ bind(&continuation); |
1828 // When we arrive here, r0 holds the generator object. | 1828 // When we arrive here, r0 holds the generator object. |
1829 __ RecordGeneratorContinuation(); | 1829 __ RecordGeneratorContinuation(); |
1830 __ ldr(r1, FieldMemOperand(r0, JSGeneratorObject::kResumeModeOffset)); | 1830 __ ldr(r1, FieldMemOperand(r0, JSGeneratorObject::kResumeModeOffset)); |
1831 __ ldr(r0, FieldMemOperand(r0, JSGeneratorObject::kInputOffset)); | 1831 __ ldr(r0, FieldMemOperand(r0, JSGeneratorObject::kInputOrDebugPosOffset)); |
1832 STATIC_ASSERT(JSGeneratorObject::kNext < JSGeneratorObject::kReturn); | 1832 STATIC_ASSERT(JSGeneratorObject::kNext < JSGeneratorObject::kReturn); |
1833 STATIC_ASSERT(JSGeneratorObject::kThrow > JSGeneratorObject::kReturn); | 1833 STATIC_ASSERT(JSGeneratorObject::kThrow > JSGeneratorObject::kReturn); |
1834 __ cmp(r1, Operand(Smi::FromInt(JSGeneratorObject::kReturn))); | 1834 __ cmp(r1, Operand(Smi::FromInt(JSGeneratorObject::kReturn))); |
1835 __ b(lt, &resume); | 1835 __ b(lt, &resume); |
1836 __ Push(result_register()); | 1836 __ Push(result_register()); |
1837 __ b(gt, &exception); | 1837 __ b(gt, &exception); |
1838 EmitCreateIteratorResult(true); | 1838 EmitCreateIteratorResult(true); |
1839 EmitUnwindAndReturn(); | 1839 EmitUnwindAndReturn(); |
1840 | 1840 |
1841 __ bind(&exception); | 1841 __ bind(&exception); |
(...skipping 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3860 DCHECK(interrupt_address == | 3860 DCHECK(interrupt_address == |
3861 isolate->builtins()->OnStackReplacement()->entry()); | 3861 isolate->builtins()->OnStackReplacement()->entry()); |
3862 return ON_STACK_REPLACEMENT; | 3862 return ON_STACK_REPLACEMENT; |
3863 } | 3863 } |
3864 | 3864 |
3865 | 3865 |
3866 } // namespace internal | 3866 } // namespace internal |
3867 } // namespace v8 | 3867 } // namespace v8 |
3868 | 3868 |
3869 #endif // V8_TARGET_ARCH_ARM | 3869 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |