Index: src/compiler/js-typed-lowering.cc |
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc |
index ccdf13879ad7d9b6174c481f8cc77a83f80c91fc..c0047f1028bab5f941b68d375a9cc6917da50c98 100644 |
--- a/src/compiler/js-typed-lowering.cc |
+++ b/src/compiler/js-typed-lowering.cc |
@@ -2165,19 +2165,21 @@ Reduction JSTypedLowering::ReduceJSGeneratorStore(Node* node) { |
Node* context = NodeProperties::GetContextInput(node); |
Node* effect = NodeProperties::GetEffectInput(node); |
Node* control = NodeProperties::GetControlInput(node); |
- int register_count = OpParameter<int>(node); |
+ const GeneratorStoreParameters& p = GeneratorStoreParametersOf(node->op()); |
FieldAccess array_field = AccessBuilder::ForJSGeneratorObjectRegisterFile(); |
FieldAccess context_field = AccessBuilder::ForJSGeneratorObjectContext(); |
FieldAccess continuation_field = |
AccessBuilder::ForJSGeneratorObjectContinuation(); |
FieldAccess input_or_debug_pos_field = |
- AccessBuilder::ForJSGeneratorObjectInputOrDebugPos(); |
+ p.suspend_type() == SuspendType::kYield |
+ ? AccessBuilder::ForJSGeneratorObjectInputOrDebugPos() |
+ : AccessBuilder::ForJSAsyncGeneratorObjectAwaitInput(); |
Node* array = effect = graph()->NewNode(simplified()->LoadField(array_field), |
generator, effect, control); |
- for (int i = 0; i < register_count; ++i) { |
+ for (int i = 0; i < p.register_count(); ++i) { |
Node* value = NodeProperties::GetValueInput(node, 3 + i); |
effect = graph()->NewNode( |
simplified()->StoreField(AccessBuilder::ForFixedArraySlot(i)), array, |