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 4506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4517 Register function = x4; | 4517 Register function = x4; |
4518 | 4518 |
4519 // The value stays in x0, and is ultimately read by the resumed generator, as | 4519 // The value stays in x0, and is ultimately read by the resumed generator, as |
4520 // if CallRuntime(Runtime::kSuspendJSGeneratorObject) returned it. Or it | 4520 // if CallRuntime(Runtime::kSuspendJSGeneratorObject) returned it. Or it |
4521 // is read to throw the value when the resumed generator is already closed. x1 | 4521 // is read to throw the value when the resumed generator is already closed. x1 |
4522 // will hold the generator object until the activation has been resumed. | 4522 // will hold the generator object until the activation has been resumed. |
4523 VisitForStackValue(generator); | 4523 VisitForStackValue(generator); |
4524 VisitForAccumulatorValue(value); | 4524 VisitForAccumulatorValue(value); |
4525 __ Pop(generator_object); | 4525 __ Pop(generator_object); |
4526 | 4526 |
| 4527 // Store input value into generator object. |
| 4528 __ Str(result_register(), |
| 4529 FieldMemOperand(x1, JSGeneratorObject::kInputOffset)); |
| 4530 __ Mov(x2, result_register()); |
| 4531 __ RecordWriteField(x1, JSGeneratorObject::kInputOffset, x2, x3, |
| 4532 kLRHasBeenSaved, kDontSaveFPRegs); |
| 4533 |
4527 // Load suspended function and context. | 4534 // Load suspended function and context. |
4528 __ Ldr(cp, FieldMemOperand(generator_object, | 4535 __ Ldr(cp, FieldMemOperand(generator_object, |
4529 JSGeneratorObject::kContextOffset)); | 4536 JSGeneratorObject::kContextOffset)); |
4530 __ Ldr(function, FieldMemOperand(generator_object, | 4537 __ Ldr(function, FieldMemOperand(generator_object, |
4531 JSGeneratorObject::kFunctionOffset)); | 4538 JSGeneratorObject::kFunctionOffset)); |
4532 | 4539 |
4533 // Load receiver and store as the first argument. | 4540 // Load receiver and store as the first argument. |
4534 __ Ldr(x10, FieldMemOperand(generator_object, | 4541 __ Ldr(x10, FieldMemOperand(generator_object, |
4535 JSGeneratorObject::kReceiverOffset)); | 4542 JSGeneratorObject::kReceiverOffset)); |
4536 __ Push(x10); | 4543 __ Push(x10); |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4834 } | 4841 } |
4835 | 4842 |
4836 return INTERRUPT; | 4843 return INTERRUPT; |
4837 } | 4844 } |
4838 | 4845 |
4839 | 4846 |
4840 } // namespace internal | 4847 } // namespace internal |
4841 } // namespace v8 | 4848 } // namespace v8 |
4842 | 4849 |
4843 #endif // V8_TARGET_ARCH_ARM64 | 4850 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |