| 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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 /// Map containing information about the warnings and hints that have been | 430 /// Map containing information about the warnings and hints that have been |
| 431 /// suppressed for each library. | 431 /// suppressed for each library. |
| 432 Map<Uri, SuppressionInfo> suppressedWarnings = <Uri, SuppressionInfo>{}; | 432 Map<Uri, SuppressionInfo> suppressedWarnings = <Uri, SuppressionInfo>{}; |
| 433 | 433 |
| 434 final bool suppressWarnings; | 434 final bool suppressWarnings; |
| 435 | 435 |
| 436 final api.CompilerOutputProvider outputProvider; | 436 final api.CompilerOutputProvider outputProvider; |
| 437 | 437 |
| 438 bool disableInlining = false; | 438 bool disableInlining = false; |
| 439 | 439 |
| 440 /// True if compilation was aborted with a [CompilerCancelledException]. Only |
| 441 /// set after Future retuned by [run] has completed. |
| 442 bool compilerWasCancelled = false; |
| 443 |
| 440 List<Uri> librariesToAnalyzeWhenRun; | 444 List<Uri> librariesToAnalyzeWhenRun; |
| 441 | 445 |
| 442 Tracer tracer; | 446 Tracer tracer; |
| 443 | 447 |
| 444 CompilerTask measuredTask; | 448 CompilerTask measuredTask; |
| 445 Element _currentElement; | 449 Element _currentElement; |
| 446 LibraryElement coreLibrary; | 450 LibraryElement coreLibrary; |
| 447 LibraryElement isolateLibrary; | 451 LibraryElement isolateLibrary; |
| 448 LibraryElement isolateHelperLibrary; | 452 LibraryElement isolateHelperLibrary; |
| 449 LibraryElement jsHelperLibrary; | 453 LibraryElement jsHelperLibrary; |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 reportDiagnostic(null, | 797 reportDiagnostic(null, |
| 794 MessageKind.GENERIC.message({'text': '$message'}), | 798 MessageKind.GENERIC.message({'text': '$message'}), |
| 795 api.Diagnostic.VERBOSE_INFO); | 799 api.Diagnostic.VERBOSE_INFO); |
| 796 } | 800 } |
| 797 | 801 |
| 798 Future<bool> run(Uri uri) { | 802 Future<bool> run(Uri uri) { |
| 799 totalCompileTime.start(); | 803 totalCompileTime.start(); |
| 800 | 804 |
| 801 return new Future.sync(() => runCompiler(uri)).catchError((error) { | 805 return new Future.sync(() => runCompiler(uri)).catchError((error) { |
| 802 if (error is CompilerCancelledException) { | 806 if (error is CompilerCancelledException) { |
| 807 compilerWasCancelled = true; |
| 803 log('Error: $error'); | 808 log('Error: $error'); |
| 804 return false; | 809 return false; |
| 805 } | 810 } |
| 806 | 811 |
| 807 try { | 812 try { |
| 808 if (!hasCrashed) { | 813 if (!hasCrashed) { |
| 809 hasCrashed = true; | 814 hasCrashed = true; |
| 810 if (error is SpannableAssertionFailure) { | 815 if (error is SpannableAssertionFailure) { |
| 811 reportAssertionFailure(error); | 816 reportAssertionFailure(error); |
| 812 } else { | 817 } else { |
| (...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1801 static NullSink outputProvider(String name, String extension) { | 1806 static NullSink outputProvider(String name, String extension) { |
| 1802 return new NullSink('$name.$extension'); | 1807 return new NullSink('$name.$extension'); |
| 1803 } | 1808 } |
| 1804 } | 1809 } |
| 1805 | 1810 |
| 1806 /// Information about suppressed warnings and hints for a given library. | 1811 /// Information about suppressed warnings and hints for a given library. |
| 1807 class SuppressionInfo { | 1812 class SuppressionInfo { |
| 1808 int warnings = 0; | 1813 int warnings = 0; |
| 1809 int hints = 0; | 1814 int hints = 0; |
| 1810 } | 1815 } |
| OLD | NEW |