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

Unified Diff: pkg/analyzer/lib/src/dart/ast/ast.dart

Issue 1700263002: Add data structures to AST to indicate potentially mutated variables. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/analyzer/lib/src/dart/ast/ast.dart
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart
index dafbff2a599875377fb12b9562bb0fff78fe640c..58586c01afa363d8d6c1c26f0d83bca12af16a6f 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart
@@ -4721,6 +4721,9 @@ class ForStatementImpl extends StatementImpl implements ForStatement {
* > | [ExpressionFunctionBody]
*/
abstract class FunctionBodyImpl extends AstNodeImpl implements FunctionBody {
+ @override
+ LocalVariableInfoImpl localVariableInfo;
+
/**
* Return `true` if this function body is asynchronous.
*/
@@ -6557,6 +6560,19 @@ abstract class LiteralImpl extends ExpressionImpl implements Literal {
}
/**
+ * Concrete implementation of [LocalVariableInfo].
+ */
+class LocalVariableInfoImpl extends LocalVariableInfo {
+ @override
+ final Set<VariableElement> potentiallyMutatedInClosure =
+ new Set<VariableElement>();
+
+ @override
+ final Set<VariableElement> potentiallyMutatedInScope =
+ new Set<VariableElement>();
+}
+
+/**
* A single key/value pair in a map literal.
*
* > mapLiteralEntry ::=

Powered by Google App Engine
This is Rietveld 408576698