Index: src/interpreter/interpreter-intrinsics-generator.cc |
diff --git a/src/interpreter/interpreter-intrinsics-generator.cc b/src/interpreter/interpreter-intrinsics-generator.cc |
index 6c8bb1390a1562b7f56ec5682f7f032d4c3163d4..30830b8302284919ff16da853fdafe9da3ddaf55 100644 |
--- a/src/interpreter/interpreter-intrinsics-generator.cc |
+++ b/src/interpreter/interpreter-intrinsics-generator.cc |
@@ -434,6 +434,18 @@ Node* IntrinsicsGenerator::GeneratorGetResumeMode(Node* args_reg, |
return value; |
} |
+Node* IntrinsicsGenerator::GeneratorClose(Node* args_reg, Node* arg_count, |
+ Node* context) { |
+ Node* generator = __ LoadRegister(args_reg); |
+ Node* const value = |
+ __ LoadObjectField(generator, JSGeneratorObject::kResumeModeOffset); |
+ __ StoreObjectFieldNoWriteBarrier( |
+ generator, JSGeneratorObject::kContinuationOffset, |
+ __ SmiConstant(JSGeneratorObject::kGeneratorClosed)); |
+ |
+ return value; |
+} |
+ |
neis1
2017/05/19 17:58:12
I don't think we need to read and return the mode
mvstanton
2017/05/19 19:11:37
Good catch! Yes, the runtime function just returns
|
Node* IntrinsicsGenerator::AsyncGeneratorReject(Node* input, Node* arg_count, |
Node* context) { |
return IntrinsicAsBuiltinCall(input, context, |