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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/LocalVariableElementImpl.java

Issue 34523011: Issue 13807. Support for type promotion rules. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updates after review comments Created 7 years, 2 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 | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/ParameterElementImpl.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cf5688163c67536f01bf20952ff3ef3364e365af..9f4868d80ea2f8607d687a06945aac259b8722f4 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
@@ -26,6 +26,11 @@ import com.google.dart.engine.utilities.source.SourceRange;
*/
public class LocalVariableElementImpl extends VariableElementImpl implements LocalVariableElement {
/**
+ * Is {@code true} if this variable is potentially mutated somewhere in its scope.
+ */
+ private boolean isPotentiallyMutated;
+
+ /**
* The offset to the beginning of the visible range for this element.
*/
private int visibleRangeOffset;
@@ -68,6 +73,18 @@ public class LocalVariableElementImpl extends VariableElementImpl implements Loc
return new SourceRange(visibleRangeOffset, visibleRangeLength);
}
+ @Override
+ public boolean isPotentiallyMutated() {
+ return isPotentiallyMutated;
+ }
+
+ /**
+ * Specifies that this variable is potentially mutated somewhere in its scope.
+ */
+ public void markPotentiallyMutated() {
+ isPotentiallyMutated = true;
+ }
+
/**
* Set the visible range for this element to the range starting at the given offset with the given
* length.
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/ParameterElementImpl.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698