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

Unified Diff: pkg/kernel/lib/ast.dart

Issue 3000333002: Fix several bugs in closure conversion. (Closed)
Patch Set: Created 3 years, 4 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: pkg/kernel/lib/ast.dart
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart
index f0d508fa304f7a54799b98ecc72f1f45b07abceb..a19135607034c111754c0a87da5f30bbb714c219 100644
--- a/pkg/kernel/lib/ast.dart
+++ b/pkg/kernel/lib/ast.dart
@@ -3178,6 +3178,7 @@ class ClosureCreation extends Expression {
abstract class Statement extends TreeNode {
accept(StatementVisitor v);
accept1(StatementVisitor1 v, arg);
+ bool get isLoop => false;
Dmitry Stefantsov 2017/08/24 09:41:13 Personally, I don't like modifying AST definitions
sjindel 2017/08/24 11:11:43 I understand that, but I feel like determining whe
Dmitry Stefantsov 2017/08/24 11:49:57 I agree that it's a general operation and that it
sjindel 2017/08/24 14:50:13 Done.
}
/// A statement with a compile-time error.
@@ -3363,6 +3364,8 @@ class WhileStatement extends Statement {
body?.parent = this;
}
}
+
+ bool get isLoop => true;
}
class DoStatement extends Statement {
@@ -3392,6 +3395,8 @@ class DoStatement extends Statement {
condition?.parent = this;
}
}
+
+ bool get isLoop => true;
}
class ForStatement extends Statement {
@@ -3429,6 +3434,8 @@ class ForStatement extends Statement {
body?.parent = this;
}
}
+
+ bool get isLoop => true;
}
class ForInStatement extends Statement {
@@ -3473,6 +3480,8 @@ class ForInStatement extends Statement {
body?.parent = this;
}
}
+
+ bool get isLoop => true;
}
/// Statement of form `switch (e) { case x: ... }`.

Powered by Google App Engine
This is Rietveld 408576698