Index: src/compiler/js-intrinsic-lowering.cc |
diff --git a/src/compiler/js-intrinsic-lowering.cc b/src/compiler/js-intrinsic-lowering.cc |
index 9a1fe0a8b6fa4e4e12b8dde28101c1b96cc40b92..2a7a3a3896d4881c3351fcb1227e0d3f155afd91 100644 |
--- a/src/compiler/js-intrinsic-lowering.cc |
+++ b/src/compiler/js-intrinsic-lowering.cc |
@@ -42,6 +42,8 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) { |
return ReduceGeneratorGetInputOrDebugPos(node); |
case Runtime::kInlineGeneratorGetResumeMode: |
return ReduceGeneratorGetResumeMode(node); |
+ case Runtime::kInlineGeneratorGetContext: |
+ return ReduceGeneratorGetContext(node); |
case Runtime::kInlineIsArray: |
return ReduceIsInstanceType(node, JS_ARRAY_TYPE); |
case Runtime::kInlineIsTypedArray: |
@@ -140,6 +142,16 @@ Reduction JSIntrinsicLowering::ReduceGeneratorGetInputOrDebugPos(Node* node) { |
return Change(node, op, generator, effect, control); |
} |
+Reduction JSIntrinsicLowering::ReduceGeneratorGetContext(Node* node) { |
+ Node* const generator = NodeProperties::GetValueInput(node, 0); |
+ Node* const effect = NodeProperties::GetEffectInput(node); |
+ Node* const control = NodeProperties::GetControlInput(node); |
+ Operator const* const op = |
+ simplified()->LoadField(AccessBuilder::ForJSGeneratorObjectContext()); |
+ |
+ return Change(node, op, generator, effect, control); |
+} |
+ |
Reduction JSIntrinsicLowering::ReduceGeneratorGetResumeMode(Node* node) { |
Node* const generator = NodeProperties::GetValueInput(node, 0); |
Node* const effect = NodeProperties::GetEffectInput(node); |