Chromium Code Reviews| Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/LocalVariableElementImpl.java |
| diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/LocalVariableElementImpl.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/LocalVariableElementImpl.java |
| index 9f4868d80ea2f8607d687a06945aac259b8722f4..dfaabf3658dee109a2df976e393497d3b5848a97 100644 |
| --- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/LocalVariableElementImpl.java |
| +++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/LocalVariableElementImpl.java |
| @@ -28,7 +28,12 @@ public class LocalVariableElementImpl extends VariableElementImpl implements Loc |
| /** |
| * Is {@code true} if this variable is potentially mutated somewhere in its scope. |
| */ |
| - private boolean isPotentiallyMutated; |
| + private boolean isPotentiallyMutatedInScope; |
| + |
| + /** |
| + * Is {@code true} if this variable is potentially mutated somewhere in closure. |
| + */ |
| + private boolean isPotentiallyMutatedInClosure; |
| /** |
| * The offset to the beginning of the visible range for this element. |
| @@ -74,15 +79,27 @@ public class LocalVariableElementImpl extends VariableElementImpl implements Loc |
| } |
| @Override |
| - public boolean isPotentiallyMutated() { |
| - return isPotentiallyMutated; |
| + public boolean isPotentiallyMutatedInClosure() { |
| + return isPotentiallyMutatedInClosure; |
| + } |
| + |
| + @Override |
| + public boolean isPotentiallyMutatedInScope() { |
| + return isPotentiallyMutatedInScope; |
| } |
| /** |
| * Specifies that this variable is potentially mutated somewhere in its scope. |
| */ |
| public void markPotentiallyMutated() { |
|
Brian Wilkerson
2013/10/29 19:34:06
nit: add "InScope" to name.
|
| - isPotentiallyMutated = true; |
| + isPotentiallyMutatedInScope = true; |
| + } |
| + |
| + /** |
| + * Specifies that this variable is potentially mutated somewhere in closure. |
| + */ |
| + public void markPotentiallyMutatedInClosure() { |
| + isPotentiallyMutatedInClosure = true; |
| } |
| /** |