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 | 7 import 'dart:async' show |
8 EventSink, | 8 EventSink, |
9 Future; | 9 Future; |
10 | 10 |
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1170 return; | 1170 return; |
1171 } | 1171 } |
1172 } | 1172 } |
1173 | 1173 |
1174 if (analyzeOnly) { | 1174 if (analyzeOnly) { |
1175 if (!analyzeAll && !compilationFailed) { | 1175 if (!analyzeAll && !compilationFailed) { |
1176 // No point in reporting unused code when [analyzeAll] is true: all | 1176 // No point in reporting unused code when [analyzeAll] is true: all |
1177 // code is artificially used. | 1177 // code is artificially used. |
1178 // If compilation failed, it is possible that the error prevents the | 1178 // If compilation failed, it is possible that the error prevents the |
1179 // compiler from analyzing all the code. | 1179 // compiler from analyzing all the code. |
1180 // TODO(johnniwinther): Reenable this when the reporting is more | 1180 reportUnusedCode(); |
1181 // precise. | |
1182 //reportUnusedCode(); | |
1183 } | 1181 } |
1184 return; | 1182 return; |
1185 } | 1183 } |
1186 assert(mainFunction != null); | 1184 assert(mainFunction != null); |
1187 phase = PHASE_DONE_RESOLVING; | 1185 phase = PHASE_DONE_RESOLVING; |
1188 | 1186 |
1189 world.populate(); | 1187 world.populate(); |
1190 // Compute whole-program-knowledge that the backend needs. (This might | 1188 // Compute whole-program-knowledge that the backend needs. (This might |
1191 // require the information computed in [world.populate].) | 1189 // require the information computed in [world.populate].) |
1192 backend.onResolutionComplete(); | 1190 backend.onResolutionComplete(); |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1834 | 1832 |
1835 @override | 1833 @override |
1836 InterfaceType streamType([DartType elementType]) { | 1834 InterfaceType streamType([DartType elementType]) { |
1837 InterfaceType type = streamClass.computeType(compiler); | 1835 InterfaceType type = streamClass.computeType(compiler); |
1838 if (elementType == null) { | 1836 if (elementType == null) { |
1839 return streamClass.rawType; | 1837 return streamClass.rawType; |
1840 } | 1838 } |
1841 return type.createInstantiation([elementType]); | 1839 return type.createInstantiation([elementType]); |
1842 } | 1840 } |
1843 } | 1841 } |
OLD | NEW |