Index: src/compiler/js-typed-lowering.cc |
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc |
index ab8e0133b4481174a746ef8797146206034391f2..918ce5e31852b195edb1f74475fb99b3479bc2ac 100644 |
--- a/src/compiler/js-typed-lowering.cc |
+++ b/src/compiler/js-typed-lowering.cc |
@@ -1727,6 +1727,7 @@ Reduction JSTypedLowering::ReduceJSGeneratorStore(Node* node) { |
DCHECK_EQ(IrOpcode::kJSGeneratorStore, node->opcode()); |
Node* generator = NodeProperties::GetValueInput(node, 0); |
Node* continuation = NodeProperties::GetValueInput(node, 1); |
+ Node* offset = NodeProperties::GetValueInput(node, 2); |
Node* context = NodeProperties::GetContextInput(node); |
Node* effect = NodeProperties::GetEffectInput(node); |
Node* control = NodeProperties::GetControlInput(node); |
@@ -1736,12 +1737,13 @@ Reduction JSTypedLowering::ReduceJSGeneratorStore(Node* node) { |
FieldAccess context_field = AccessBuilder::ForJSGeneratorObjectContext(); |
FieldAccess continuation_field = |
AccessBuilder::ForJSGeneratorObjectContinuation(); |
+ FieldAccess input_field = AccessBuilder::ForJSGeneratorObjectInput(); |
Jarin
2016/06/20 07:56:49
Please, add some explanation why it is ok to hijac
rmcilroy
2016/06/20 11:11:26
+1
|
Node* array = effect = graph()->NewNode(simplified()->LoadField(array_field), |
generator, effect, control); |
for (int i = 0; i < register_count; ++i) { |
- Node* value = NodeProperties::GetValueInput(node, 2 + i); |
+ Node* value = NodeProperties::GetValueInput(node, 3 + i); |
effect = graph()->NewNode( |
simplified()->StoreField(AccessBuilder::ForFixedArraySlot(i)), array, |
value, effect, control); |
@@ -1751,6 +1753,8 @@ Reduction JSTypedLowering::ReduceJSGeneratorStore(Node* node) { |
context, effect, control); |
effect = graph()->NewNode(simplified()->StoreField(continuation_field), |
generator, continuation, effect, control); |
+ effect = graph()->NewNode(simplified()->StoreField(input_field), generator, |
+ offset, effect, control); |
ReplaceWithValue(node, effect, effect, control); |
return Changed(effect); |