| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 dart2js.compiler_base; | 5 library dart2js.compiler_base; |
| 6 | 6 |
| 7 import 'dart:async' show EventSink, Future; | 7 import 'dart:async' show EventSink, Future; |
| 8 | 8 |
| 9 import '../compiler_new.dart' as api; | 9 import '../compiler_new.dart' as api; |
| 10 import 'closure.dart' as closureMapping show ClosureTask; | 10 import 'closure.dart' as closureMapping show ClosureTask; |
| (...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 937 } | 937 } |
| 938 return element; | 938 return element; |
| 939 } | 939 } |
| 940 | 940 |
| 941 bool get isMockCompilation => false; | 941 bool get isMockCompilation => false; |
| 942 | 942 |
| 943 void reportUnusedCode() { | 943 void reportUnusedCode() { |
| 944 void checkLive(member) { | 944 void checkLive(member) { |
| 945 if (member.isMalformed) return; | 945 if (member.isMalformed) return; |
| 946 if (member.isFunction) { | 946 if (member.isFunction) { |
| 947 if (!enqueuer.resolution.hasBeenProcessed(member)) { | 947 if (!resolutionWorldBuilder.isMemberUsed(member)) { |
| 948 reporter.reportHintMessage( | 948 reporter.reportHintMessage( |
| 949 member, MessageKind.UNUSED_METHOD, {'name': member.name}); | 949 member, MessageKind.UNUSED_METHOD, {'name': member.name}); |
| 950 } | 950 } |
| 951 } else if (member.isClass) { | 951 } else if (member.isClass) { |
| 952 if (!member.isResolved) { | 952 if (!member.isResolved) { |
| 953 reporter.reportHintMessage( | 953 reporter.reportHintMessage( |
| 954 member, MessageKind.UNUSED_CLASS, {'name': member.name}); | 954 member, MessageKind.UNUSED_CLASS, {'name': member.name}); |
| 955 } else { | 955 } else { |
| 956 member.forEachLocalMember(checkLive); | 956 member.forEachLocalMember(checkLive); |
| 957 } | 957 } |
| (...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2037 if (library != null && library.isSynthesized) { | 2037 if (library != null && library.isSynthesized) { |
| 2038 return null; | 2038 return null; |
| 2039 } | 2039 } |
| 2040 if (library == null && required) { | 2040 if (library == null && required) { |
| 2041 throw new SpannableAssertionFailure( | 2041 throw new SpannableAssertionFailure( |
| 2042 library, "The library '${uri}' was not found."); | 2042 library, "The library '${uri}' was not found."); |
| 2043 } | 2043 } |
| 2044 return library; | 2044 return library; |
| 2045 } | 2045 } |
| 2046 } | 2046 } |
| OLD | NEW |