Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: src/interpreter/interpreter-intrinsics-generator.cc

Issue 2891353002: [ignition] Use an intrinsic for GeneratorClose. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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,
« no previous file with comments | « src/interpreter/interpreter-intrinsics.h ('k') | test/cctest/interpreter/bytecode_expectations/ForOfLoop.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698