| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library analyze_unused_dart2js; | 5 library analyze_unused_dart2js; |
| 6 | 6 |
| 7 import 'package:async_helper/async_helper.dart'; | 7 import 'package:async_helper/async_helper.dart'; |
| 8 | 8 |
| 9 import 'package:compiler/src/compiler.dart'; | 9 import 'package:compiler/src/compiler.dart'; |
| 10 import 'package:compiler/src/diagnostics/messages.dart'; | 10 import 'package:compiler/src/diagnostics/messages.dart'; |
| 11 import 'package:compiler/src/filenames.dart'; | 11 import 'package:compiler/src/filenames.dart'; |
| 12 | 12 |
| 13 import 'analyze_helper.dart'; | 13 import 'analyze_helper.dart'; |
| 14 | 14 |
| 15 // Do not remove WHITE_LIST even if it's empty. The error message for | 15 // Do not remove WHITE_LIST even if it's empty. The error message for |
| 16 // unused members refers to WHITE_LIST by name. | 16 // unused members refers to WHITE_LIST by name. |
| 17 const Map<String, List<String>> WHITE_LIST = const { | 17 const Map<String, List<String>> WHITE_LIST = const { |
| 18 // Helper methods for debugging should never be called from production code: | 18 // Helper methods for debugging should never be called from production code: |
| 19 "lib/src/helpers/": const [" is never "], | 19 "lib/src/helpers/": const [" is never "], |
| 20 | 20 |
| 21 // Node.asAssert, Node.asLiteralBool is never used. | 21 // Node.asLiteralBool is never used. |
| 22 "lib/src/tree/nodes.dart": const [ | 22 "lib/src/tree/nodes.dart": const [ |
| 23 "The method 'asAssert' is never called.", | 23 "The method 'asLiteralBool' is never called"], |
| 24 "The method 'asLiteralBool' is never called."], | |
| 25 | 24 |
| 26 // Some things in dart_printer are not yet used | 25 // Some things in dart_printer are not yet used |
| 27 "lib/src/dart_backend/backend_ast_nodes.dart": const [" is never "], | 26 "lib/src/dart_backend/backend_ast_nodes.dart": const [" is never "], |
| 28 | 27 |
| 29 // Uncalled methods in SemanticSendVisitor and subclasses. | 28 // Uncalled methods in SemanticSendVisitor and subclasses. |
| 30 "lib/src/resolution/semantic_visitor.dart": const [ | 29 "lib/src/resolution/semantic_visitor.dart": const [ |
| 31 "The method 'error"], | 30 "The method 'error"], |
| 32 "lib/src/resolution/semantic_visitor_mixins.dart": const [ | 31 "lib/src/resolution/semantic_visitor_mixins.dart": const [ |
| 33 "The class 'SuperBulkMixin'", | 32 "The class 'SuperBulkMixin'", |
| 34 "The class 'Base", | 33 "The class 'Base", |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 } else if (member.isTypedef) { | 93 } else if (member.isTypedef) { |
| 95 if (member.isResolved) { | 94 if (member.isResolved) { |
| 96 compiler.reportHint(member, MessageKind.GENERIC, | 95 compiler.reportHint(member, MessageKind.GENERIC, |
| 97 {'text': "Helper typedef in production code '$member'."}); | 96 {'text': "Helper typedef in production code '$member'."}); |
| 98 } | 97 } |
| 99 } | 98 } |
| 100 } | 99 } |
| 101 compiler.libraryLoader.lookupLibrary(helperUri).forEachLocalMember(checkLive); | 100 compiler.libraryLoader.lookupLibrary(helperUri).forEachLocalMember(checkLive); |
| 102 return handler.checkResults(); | 101 return handler.checkResults(); |
| 103 } | 102 } |
| OLD | NEW |