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

Unified Diff: pkg/analyzer/lib/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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/ast/ast.dart » ('j') | pkg/analyzer/lib/src/generated/resolver.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/dart/ast/ast.dart
diff --git a/pkg/analyzer/lib/dart/ast/ast.dart b/pkg/analyzer/lib/dart/ast/ast.dart
index 8e295f2c3410800bceda00ca30cc2bbf0722e98b..57e69201eb29a7f2da7315f7bd8f7e8e619a7b4e 100644
--- a/pkg/analyzer/lib/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/dart/ast/ast.dart
@@ -536,7 +536,7 @@ abstract class AstNode {
* (either AST nodes or tokens) that make up the contents of this node,
* including doc comments but excluding other comments.
*/
- Iterable/*<AstNode | Token>*/ get childEntities;
+ Iterable /*<AstNode | Token>*/ get childEntities;
/**
* Return the offset of the character immediately following the last character
@@ -591,7 +591,7 @@ abstract class AstNode {
* Use the given [visitor] to visit this node. Return the value returned by
* the visitor as a result of visiting this node.
*/
- dynamic /* =E */ accept/*<E>*/(AstVisitor/*<E>*/ visitor);
+ dynamic /* =E */ accept /*<E>*/ (AstVisitor /*<E>*/ visitor);
/**
* Return the most immediate ancestor of this node for which the [predicate]
@@ -3776,6 +3776,13 @@ abstract class FunctionBody extends AstNode {
Token get keyword;
/**
+ * Return additional information about local variables and parameters that
+ * are declared within this function body or any enclosing function body.
+ * Returns `null` if resolution has not yet been performed.
+ */
+ LocalVariableInfo get localVariableInfo;
Brian Wilkerson 2016/02/16 21:13:39 I'm wondering whether it might not be better to av
Paul Berry 2016/02/16 21:49:47 Good idea. Not only does this keep the API smalle
+
+ /**
* Return the star following the 'async' or 'sync' keyword, or `null` if there
* is no star.
*/
@@ -5215,6 +5222,27 @@ abstract class ListLiteral extends TypedLiteral {
abstract class Literal extends Expression {}
/**
+ * Additional information about local variables within a function or method
+ * produced at resolution time.
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+abstract class LocalVariableInfo {
+ /**
+ * Return the set of local variables and parameters that are potentially
+ * mutated within a local function other than the function in which they are
+ * declared.
+ */
+ Set<VariableElement> get potentiallyMutatedInClosure;
+
+ /**
+ * Return the set of local variables and parameters that are potentially
+ * mutated within the scope of their declarations.
+ */
+ Set<VariableElement> get potentiallyMutatedInScope;
+}
+
+/**
* A literal map.
*
* > mapLiteral ::=
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/ast/ast.dart » ('j') | pkg/analyzer/lib/src/generated/resolver.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698