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

Unified Diff: lib/compiler/implementation/compile_time_constants.dart

Issue 10996062: Use static final empty Modifier instead of null. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Missing uses fixed. Created 8 years, 3 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: lib/compiler/implementation/compile_time_constants.dart
diff --git a/lib/compiler/implementation/compile_time_constants.dart b/lib/compiler/implementation/compile_time_constants.dart
index f0358bdc90dd3699d9bde8dfd7219ab39c4fb041..1cd58bb7f9f054df53423613559973dcbd6e5332 100644
--- a/lib/compiler/implementation/compile_time_constants.dart
+++ b/lib/compiler/implementation/compile_time_constants.dart
@@ -398,12 +398,10 @@ class CompileTimeConstantEvaluator extends AbstractVisitor {
return constant;
} else if (Elements.isStaticOrTopLevelField(element)) {
Constant result;
- if (element.modifiers !== null) {
- if (element.modifiers.isConst()) {
- result = compiler.compileConstant(element);
- } else if (element.modifiers.isFinal() && !isEvaluatingConstant) {
- result = compiler.compileVariable(element);
- }
+ if (element.modifiers.isConst()) {
+ result = compiler.compileConstant(element);
+ } else if (element.modifiers.isFinal() && !isEvaluatingConstant) {
+ result = compiler.compileVariable(element);
}
if (result !== null) return result;
}
« no previous file with comments | « no previous file | lib/compiler/implementation/dart_backend/backend.dart » ('j') | lib/compiler/implementation/tree/nodes.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698