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

Unified Diff: compiler/java/com/google/dart/compiler/ast/Modifiers.java

Issue 10699027: Flag uninitialized final variables in a class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: # Created 8 years, 6 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: compiler/java/com/google/dart/compiler/ast/Modifiers.java
diff --git a/compiler/java/com/google/dart/compiler/ast/Modifiers.java b/compiler/java/com/google/dart/compiler/ast/Modifiers.java
index 860f5deb5bd744aaa32e9caaf112119254cef8dd..4e1b78db201baa6fe689695282145c251d0528d2 100644
--- a/compiler/java/com/google/dart/compiler/ast/Modifiers.java
+++ b/compiler/java/com/google/dart/compiler/ast/Modifiers.java
@@ -27,6 +27,7 @@ public class Modifiers {
private static final int FLAG_REDIRECTEDCONSTRUCTOR = FLAG_ABSTRACTFIELD << 1;
private static final int FLAG_FINAL = FLAG_REDIRECTEDCONSTRUCTOR << 1;
private static final int FLAG_NAMED = FLAG_FINAL << 1;
+ private static final int FLAG_INITIALIZED = FLAG_NAMED << 1;
private final int value;
@@ -43,6 +44,7 @@ public class Modifiers {
public boolean isRedirectedConstructor() { return is(FLAG_REDIRECTEDCONSTRUCTOR); }
public boolean isFinal() { return is(FLAG_FINAL); }
public boolean isNamed() { return is(FLAG_NAMED); }
+ public boolean isInitialized() { return is(FLAG_INITIALIZED); }
public Modifiers makeStatic() { return make(FLAG_STATIC); }
public Modifiers makeConstant() { return make(FLAG_CONSTANT); }
@@ -57,6 +59,7 @@ public class Modifiers {
public Modifiers makeRedirectedConstructor() { return make(FLAG_REDIRECTEDCONSTRUCTOR); }
public Modifiers makeFinal() { return make(FLAG_FINAL); }
public Modifiers makeNamed() { return make(FLAG_NAMED); }
+ public Modifiers makeInitialized() { return make(FLAG_INITIALIZED); }
public Modifiers removeStatic() { return remove(FLAG_STATIC); }
public Modifiers removeConstant() { return remove(FLAG_CONSTANT); }
@@ -71,6 +74,7 @@ public class Modifiers {
public Modifiers removeRedirectedConstructor() { return remove(FLAG_REDIRECTEDCONSTRUCTOR); }
public Modifiers removeFinal() { return remove(FLAG_FINAL); }
public Modifiers removeNamed() { return remove(FLAG_NAMED); }
+ public Modifiers removeIniitalized() { return remove(FLAG_INITIALIZED); }
public boolean is(int flag) {
return (value & flag) != 0;

Powered by Google App Engine
This is Rietveld 408576698