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