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

Unified Diff: lib/src/codegen/side_effect_analysis.dart

Issue 1751963002: refactor/simplify nullable inference code (Closed) Base URL: git@github.com:dart-lang/dev_compiler.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
Index: lib/src/codegen/side_effect_analysis.dart
diff --git a/lib/src/codegen/side_effect_analysis.dart b/lib/src/codegen/side_effect_analysis.dart
index df6d84744cbaebc3a8206e2317cccf906d176510..1272732e9828b517494053ed05f24dde018a0583 100644
--- a/lib/src/codegen/side_effect_analysis.dart
+++ b/lib/src/codegen/side_effect_analysis.dart
@@ -5,9 +5,10 @@
import 'package:analyzer/src/generated/ast.dart';
import 'package:analyzer/src/generated/constant.dart';
import 'package:analyzer/src/generated/element.dart';
-import 'package:analyzer/src/generated/error.dart' show ErrorReporter;
-import 'package:analyzer/src/generated/engine.dart' show RecordingErrorListener;
+import 'package:analyzer/src/generated/error.dart'
+ show AnalysisErrorListener, ErrorReporter;
import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
+import 'package:analyzer/src/generated/source.dart' show Source;
/// True is the expression can be evaluated multiple times without causing
/// code execution. This is true for final fields. This can be true for local
@@ -97,12 +98,11 @@ class _AssignmentFinder extends RecursiveAstVisitor {
class ConstFieldVisitor {
final ConstantVisitor _constantVisitor;
- ConstFieldVisitor(TypeProvider types, CompilationUnit unit)
+ ConstFieldVisitor(TypeProvider types, Source source)
// TODO(jmesserly): support -D variables on the command line
: _constantVisitor = new ConstantVisitor(
new ConstantEvaluationEngine(types, new DeclaredVariables()),
- new ErrorReporter(
- new RecordingErrorListener(), unit.element.source));
+ new ErrorReporter(AnalysisErrorListener.NULL_LISTENER, source));
// TODO(jmesserly): this is used to determine if the field initialization is
// side effect free. We should make the check more general, as things like

Powered by Google App Engine
This is Rietveld 408576698