| 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'; | 
| (...skipping 21 matching lines...) Expand all  Loading... | 
| 32     "The method 'error", | 32     "The method 'error", | 
| 33     "The method 'visit" | 33     "The method 'visit" | 
| 34   ], | 34   ], | 
| 35 | 35 | 
| 36   // Uncalled type predicate.  Keep while related predicates are used. | 36   // Uncalled type predicate.  Keep while related predicates are used. | 
| 37   "lib/src/ssa/nodes.dart": const ["The method 'isArray' is never called"], | 37   "lib/src/ssa/nodes.dart": const ["The method 'isArray' is never called"], | 
| 38 | 38 | 
| 39   // Serialization code is only used in test. | 39   // Serialization code is only used in test. | 
| 40   "lib/src/serialization/": const ["is never"], | 40   "lib/src/serialization/": const ["is never"], | 
| 41 | 41 | 
| 42   "lib/src/universe/universe.dart": const [ | 42   "lib/src/universe/world_builder.dart": const [ | 
| 43     "The method 'getterInvocationsByName' is never called.", | 43     "The method 'getterInvocationsByName' is never called.", | 
| 44     "The method 'setterInvocationsByName' is never called." | 44     "The method 'setterInvocationsByName' is never called." | 
| 45   ], | 45   ], | 
| 46 }; | 46 }; | 
| 47 | 47 | 
| 48 void main() { | 48 void main() { | 
| 49   var uri = | 49   var uri = | 
| 50       currentDirectory.resolve('pkg/compiler/lib/src/use_unused_api.dart'); | 50       currentDirectory.resolve('pkg/compiler/lib/src/use_unused_api.dart'); | 
| 51   asyncTest(() => analyze([uri], | 51   asyncTest(() => analyze([uri], | 
| 52       // TODO(johnniwinther): Use [WHITE_LIST] again when | 52       // TODO(johnniwinther): Use [WHITE_LIST] again when | 
| (...skipping 23 matching lines...) Expand all  Loading... | 
| 76       if (member.isResolved) { | 76       if (member.isResolved) { | 
| 77         compiler.reporter.reportHintMessage(member, MessageKind.GENERIC, | 77         compiler.reporter.reportHintMessage(member, MessageKind.GENERIC, | 
| 78             {'text': "Helper typedef in production code '$member'."}); | 78             {'text': "Helper typedef in production code '$member'."}); | 
| 79       } | 79       } | 
| 80     } | 80     } | 
| 81   } | 81   } | 
| 82 | 82 | 
| 83   compiler.libraryLoader.lookupLibrary(helperUri).forEachLocalMember(checkLive); | 83   compiler.libraryLoader.lookupLibrary(helperUri).forEachLocalMember(checkLive); | 
| 84   return handler.checkResults(); | 84   return handler.checkResults(); | 
| 85 } | 85 } | 
| OLD | NEW | 
|---|