| 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 part of dart2js; | 5 part of dart2js; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * If true, print a warning for each method that was resolved, but not | 8 * If true, print a warning for each method that was resolved, but not |
| 9 * compiled. | 9 * compiled. |
| 10 */ | 10 */ |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 } | 271 } |
| 272 native.NativeEnqueuer nativeCodegenEnqueuer(world) { | 272 native.NativeEnqueuer nativeCodegenEnqueuer(world) { |
| 273 return new native.NativeEnqueuer(); | 273 return new native.NativeEnqueuer(); |
| 274 } | 274 } |
| 275 | 275 |
| 276 /// Generates the output and returns the total size of the generated code. | 276 /// Generates the output and returns the total size of the generated code. |
| 277 int assembleProgram(); | 277 int assembleProgram(); |
| 278 | 278 |
| 279 List<CompilerTask> get tasks; | 279 List<CompilerTask> get tasks; |
| 280 | 280 |
| 281 bool get canHandleCompilationFailed; |
| 282 |
| 281 void onResolutionComplete() {} | 283 void onResolutionComplete() {} |
| 282 | 284 |
| 283 ItemCompilationContext createItemCompilationContext() { | 285 ItemCompilationContext createItemCompilationContext() { |
| 284 return new ItemCompilationContext(); | 286 return new ItemCompilationContext(); |
| 285 } | 287 } |
| 286 | 288 |
| 287 bool classNeedsRti(ClassElement cls); | 289 bool classNeedsRti(ClassElement cls); |
| 288 bool methodNeedsRti(FunctionElement function); | 290 bool methodNeedsRti(FunctionElement function); |
| 289 | 291 |
| 290 /// Called during codegen when [constant] has been used. | 292 /// Called during codegen when [constant] has been used. |
| (...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1567 kind = MessageKind.HIDDEN_WARNINGS; | 1569 kind = MessageKind.HIDDEN_WARNINGS; |
| 1568 } | 1570 } |
| 1569 reportDiagnostic(null, | 1571 reportDiagnostic(null, |
| 1570 kind.message({'warnings': info.warnings, | 1572 kind.message({'warnings': info.warnings, |
| 1571 'hints': info.hints, | 1573 'hints': info.hints, |
| 1572 'uri': uri}, | 1574 'uri': uri}, |
| 1573 terseDiagnostics), | 1575 terseDiagnostics), |
| 1574 api.Diagnostic.HINT); | 1576 api.Diagnostic.HINT); |
| 1575 }); | 1577 }); |
| 1576 } | 1578 } |
| 1579 |
| 1580 // TODO(sigurdm): The dart backend should handle failed compilations. |
| 1581 if (compilationFailed && !backend.canHandleCompilationFailed) { |
| 1582 return; |
| 1583 } |
| 1584 |
| 1577 if (analyzeOnly) { | 1585 if (analyzeOnly) { |
| 1578 if (!analyzeAll && !compilationFailed) { | 1586 if (!analyzeAll && !compilationFailed) { |
| 1579 // No point in reporting unused code when [analyzeAll] is true: all | 1587 // No point in reporting unused code when [analyzeAll] is true: all |
| 1580 // code is artificially used. | 1588 // code is artificially used. |
| 1581 // If compilation failed, it is possible that the error prevents the | 1589 // If compilation failed, it is possible that the error prevents the |
| 1582 // compiler from analyzing all the code. | 1590 // compiler from analyzing all the code. |
| 1583 reportUnusedCode(); | 1591 reportUnusedCode(); |
| 1584 } | 1592 } |
| 1585 return; | 1593 return; |
| 1586 } | 1594 } |
| (...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2388 InterfaceType get nullType => nullClass.computeType(compiler); | 2396 InterfaceType get nullType => nullClass.computeType(compiler); |
| 2389 | 2397 |
| 2390 @override | 2398 @override |
| 2391 InterfaceType get numType => numClass.computeType(compiler); | 2399 InterfaceType get numType => numClass.computeType(compiler); |
| 2392 | 2400 |
| 2393 @override | 2401 @override |
| 2394 InterfaceType get stringType => stringClass.computeType(compiler); | 2402 InterfaceType get stringType => stringClass.computeType(compiler); |
| 2395 } | 2403 } |
| 2396 | 2404 |
| 2397 typedef void InternalErrorFunction(Spannable location, String message); | 2405 typedef void InternalErrorFunction(Spannable location, String message); |
| OLD | NEW |