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

Unified Diff: src/ast/ast.h

Issue 2917263002: Move generator-close on exception from the generator function to the GeneratorResume builtin. (Closed)
Patch Set: Add register allocation scope Created 3 years, 6 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
« no previous file with comments | « no previous file | src/builtins/builtins-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast.h
diff --git a/src/ast/ast.h b/src/ast/ast.h
index 7188fd19fed52c19c197b201c860602263e7059d..eebd6d750268d4209ae0eec1a5ea4ff92bb52736 100644
--- a/src/ast/ast.h
+++ b/src/ast/ast.h
@@ -2541,6 +2541,10 @@ class Suspend final : public Expression {
return suspend_id() > 0 && (flags() & SuspendFlags::kAsyncGeneratorAwait) ==
SuspendFlags::kAsyncGenerator;
}
+ inline bool IsNonInitialGeneratorYield() const {
+ // Return true if is_generator() && !is_await() && yield_id() > 0
+ return suspend_id() > 0 && (flags() == SuspendFlags::kGeneratorYield);
+ }
void set_expression(Expression* e) { expression_ = e; }
void set_suspend_id(int id) { suspend_id_ = id; }
« no previous file with comments | « no previous file | src/builtins/builtins-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698