| Index: lib/src/codegen/js_codegen.dart
|
| diff --git a/lib/src/codegen/js_codegen.dart b/lib/src/codegen/js_codegen.dart
|
| index 7f88892402f977ce167400e29f15cf9c443c26d1..31ab6535fae86b3984ff8afebeb421b18f339ed1 100644
|
| --- a/lib/src/codegen/js_codegen.dart
|
| +++ b/lib/src/codegen/js_codegen.dart
|
| @@ -27,7 +27,6 @@ import 'package:dev_compiler/src/js/js_ast.dart' show js;
|
| import 'package:dev_compiler/src/checker/rules.dart';
|
| import 'package:dev_compiler/src/info.dart';
|
| import 'package:dev_compiler/src/options.dart';
|
| -import 'package:dev_compiler/src/report.dart';
|
| import 'package:dev_compiler/src/utils.dart';
|
|
|
| import 'code_generator.dart';
|
| @@ -51,12 +50,6 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
|
| final LibraryInfo libraryInfo;
|
| final TypeRules rules;
|
|
|
| - // TODO(jmesserly): this is needed because RestrictedTypeRules can send
|
| - // messages to CheckerReporter, for things like missing types.
|
| - // We should probably refactor so this can't happen, as codegen would be too
|
| - // late to be issuing these messages.
|
| - final CheckerReporter _checkerReporter;
|
| -
|
| /// The variable for the target of the current `..` cascade expression.
|
| SimpleIdentifier _cascadeTarget;
|
| /// The variable for the current catch clause
|
| @@ -116,7 +109,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
|
| /// Memoized results of [_inLibraryCycle].
|
| final _libraryCycleMemo = new HashMap<LibraryElement, bool>();
|
|
|
| - JSCodegenVisitor(this.libraryInfo, this.rules, this._checkerReporter);
|
| + JSCodegenVisitor(this.libraryInfo, this.rules);
|
|
|
| LibraryElement get currentLibrary => libraryInfo.library;
|
|
|
| @@ -201,7 +194,6 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
|
| var source = node.element.source;
|
|
|
| _constEvaluator = new ConstantEvaluator(source, rules.provider);
|
| - _checkerReporter.enterSource(source);
|
|
|
| // TODO(jmesserly): scriptTag, directives.
|
| var body = <JS.Statement>[];
|
| @@ -230,8 +222,6 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
|
| _flushLazyFields(body);
|
| _flushLibraryProperties(body);
|
|
|
| - _checkerReporter.leaveSource();
|
| -
|
| assert(_pendingPrivateNames.isEmpty);
|
| return _statement(body);
|
| }
|
| @@ -2386,9 +2376,8 @@ class JSGenerator extends CodeGenerator {
|
| JSGenerator(String outDir, Uri root, TypeRules rules, this.options)
|
| : super(outDir, root, rules);
|
|
|
| - String generateLibrary(
|
| - LibraryUnit unit, LibraryInfo info, CheckerReporter reporter) {
|
| - var jsTree = new JSCodegenVisitor(info, rules, reporter).emitLibrary(unit);
|
| + String generateLibrary(LibraryUnit unit, LibraryInfo info) {
|
| + var jsTree = new JSCodegenVisitor(info, rules).emitLibrary(unit);
|
|
|
| var outputPath = path.join(outDir, jsOutputPath(info, root));
|
| new Directory(path.dirname(outputPath)).createSync(recursive: true);
|
|
|