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

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

Issue 1067553004: Factor out reporting from rules (Closed) Base URL: git@github.com:dart-lang/dart-dev-compiler.git@master
Patch Set: Created 5 years, 8 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/dart_codegen.dart
diff --git a/lib/src/codegen/dart_codegen.dart b/lib/src/codegen/dart_codegen.dart
index f4082ca0ebf7d2621a7bd66d88b2215609addf28..8c118d9fe10f498f521d6cf226992cb5090c8f75 100644
--- a/lib/src/codegen/dart_codegen.dart
+++ b/lib/src/codegen/dart_codegen.dart
@@ -18,7 +18,6 @@ import 'package:path/path.dart' as path;
import 'package:dev_compiler/src/info.dart';
import 'package:dev_compiler/src/checker/rules.dart';
import 'package:dev_compiler/src/options.dart';
-import 'package:dev_compiler/src/report.dart';
import 'package:dev_compiler/src/utils.dart' as utils;
import 'ast_builder.dart';
import 'code_generator.dart' as codegenerator;
@@ -435,16 +434,13 @@ class DartGenerator extends codegenerator.CodeGenerator {
out.finalize();
}
- String generateLibrary(
- LibraryUnit library, LibraryInfo info, CheckerReporter reporter) {
+ String generateLibrary(LibraryUnit library, LibraryInfo info) {
_vm = new reifier.VariableManager();
_extraImports = new Set<LibraryElement>();
for (var unit in library.partsThenLibrary) {
var outputDir = makeOutputDirectory(info, unit);
- reporter.enterSource(unit.element.source);
generateUnit(unit, info, outputDir);
- reporter.leaveSource();
}
_extraImports = null;
@@ -476,13 +472,10 @@ class EmptyDartGenerator extends codegenerator.CodeGenerator {
EmptyDartGenerator(String outDir, Uri root, TypeRules rules, this.options)
: super(outDir, root, rules);
- String generateLibrary(
- LibraryUnit library, LibraryInfo info, CheckerReporter reporter) {
+ String generateLibrary(LibraryUnit library, LibraryInfo info) {
for (var unit in library.partsThenLibrary) {
var outputDir = makeOutputDirectory(info, unit);
- reporter.enterSource(unit.element.source);
generateUnit(unit, info, outputDir);
- reporter.leaveSource();
}
return null;
}

Powered by Google App Engine
This is Rietveld 408576698