OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
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 3549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3560 Label suspend, continuation, post_runtime, resume, exception; | 3560 Label suspend, continuation, post_runtime, resume, exception; |
3561 | 3561 |
3562 __ B(&suspend); | 3562 __ B(&suspend); |
3563 // TODO(jbramley): This label is bound here because the following code | 3563 // TODO(jbramley): This label is bound here because the following code |
3564 // looks at its pos(). Is it possible to do something more efficient here, | 3564 // looks at its pos(). Is it possible to do something more efficient here, |
3565 // perhaps using Adr? | 3565 // perhaps using Adr? |
3566 __ Bind(&continuation); | 3566 __ Bind(&continuation); |
3567 // When we arrive here, x0 holds the generator object. | 3567 // When we arrive here, x0 holds the generator object. |
3568 __ RecordGeneratorContinuation(); | 3568 __ RecordGeneratorContinuation(); |
3569 __ Ldr(x1, FieldMemOperand(x0, JSGeneratorObject::kResumeModeOffset)); | 3569 __ Ldr(x1, FieldMemOperand(x0, JSGeneratorObject::kResumeModeOffset)); |
3570 __ Ldr(x0, FieldMemOperand(x0, JSGeneratorObject::kInputOffset)); | 3570 __ Ldr(x0, FieldMemOperand(x0, JSGeneratorObject::kInputOrDebugPosOffset)); |
3571 STATIC_ASSERT(JSGeneratorObject::kNext < JSGeneratorObject::kReturn); | 3571 STATIC_ASSERT(JSGeneratorObject::kNext < JSGeneratorObject::kReturn); |
3572 STATIC_ASSERT(JSGeneratorObject::kThrow > JSGeneratorObject::kReturn); | 3572 STATIC_ASSERT(JSGeneratorObject::kThrow > JSGeneratorObject::kReturn); |
3573 __ Cmp(x1, Operand(Smi::FromInt(JSGeneratorObject::kReturn))); | 3573 __ Cmp(x1, Operand(Smi::FromInt(JSGeneratorObject::kReturn))); |
3574 __ B(lt, &resume); | 3574 __ B(lt, &resume); |
3575 __ Push(result_register()); | 3575 __ Push(result_register()); |
3576 __ B(gt, &exception); | 3576 __ B(gt, &exception); |
3577 EmitCreateIteratorResult(true); | 3577 EmitCreateIteratorResult(true); |
3578 EmitUnwindAndReturn(); | 3578 EmitUnwindAndReturn(); |
3579 | 3579 |
3580 __ Bind(&exception); | 3580 __ Bind(&exception); |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3868 } | 3868 } |
3869 | 3869 |
3870 return INTERRUPT; | 3870 return INTERRUPT; |
3871 } | 3871 } |
3872 | 3872 |
3873 | 3873 |
3874 } // namespace internal | 3874 } // namespace internal |
3875 } // namespace v8 | 3875 } // namespace v8 |
3876 | 3876 |
3877 #endif // V8_TARGET_ARCH_ARM64 | 3877 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |