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

Unified Diff: runtime/vm/ast.h

Issue 538803002: Enable await in for and for-in loops. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase on master Created 6 years, 3 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 | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/ast.h
diff --git a/runtime/vm/ast.h b/runtime/vm/ast.h
index 98f48b868ec3366356c8d9409f8ebf44b024dcd4..4a872538e374476eb0c47c189282927b1bc686a8 100644
--- a/runtime/vm/ast.h
+++ b/runtime/vm/ast.h
@@ -1033,12 +1033,14 @@ class ForNode : public AstNode {
SourceLabel* label,
SequenceNode* initializer,
AstNode* condition,
+ SequenceNode* condition_preamble,
SequenceNode* increment,
SequenceNode* body)
: AstNode(token_pos),
label_(label),
initializer_(initializer),
condition_(condition),
+ condition_preamble_(condition_preamble),
increment_(increment),
body_(body) {
ASSERT(label_ != NULL);
@@ -1050,11 +1052,16 @@ class ForNode : public AstNode {
SourceLabel* label() const { return label_; }
SequenceNode* initializer() const { return initializer_; }
AstNode* condition() const { return condition_; }
+ AstNode* condition_preamble() const { return condition_preamble_; }
SequenceNode* increment() const { return increment_; }
SequenceNode* body() const { return body_; }
virtual void VisitChildren(AstNodeVisitor* visitor) const {
initializer()->Visit(visitor);
+ if (condition_preamble() != NULL) {
+ ASSERT(condition() != NULL);
+ condition_preamble()->Visit(visitor);
+ }
if (condition() != NULL) {
condition()->Visit(visitor);
}
@@ -1068,6 +1075,7 @@ class ForNode : public AstNode {
SourceLabel* label_;
SequenceNode* initializer_;
AstNode* condition_;
+ AstNode* condition_preamble_;
SequenceNode* increment_;
SequenceNode* body_;
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698