Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Side by Side Diff: sdk/lib/_internal/compiler/implementation/compiler.dart

Issue 48483002: Remove deprecated parts of dart:async. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 } 755 }
756 } 756 }
757 757
758 void log(message) { 758 void log(message) {
759 reportDiagnostic(null, message, api.Diagnostic.VERBOSE_INFO); 759 reportDiagnostic(null, message, api.Diagnostic.VERBOSE_INFO);
760 } 760 }
761 761
762 Future<bool> run(Uri uri) { 762 Future<bool> run(Uri uri) {
763 totalCompileTime.start(); 763 totalCompileTime.start();
764 764
765 return new Future.sync(() => runCompiler(uri)).catchError((error) { 765 return new Future.sync(() => runCompiler(uri)).catchError((error, trace) {
766 if (error is CompilerCancelledException) { 766 if (error is CompilerCancelledException) {
767 log('Error: $error'); 767 log('Error: $error');
768 return false; 768 return false;
769 } 769 }
770 770
771 try { 771 try {
772 if (!hasCrashed) { 772 if (!hasCrashed) {
773 hasCrashed = true; 773 hasCrashed = true;
774 reportDiagnostic(new SourceSpan(uri, 0, 0), 774 reportDiagnostic(new SourceSpan(uri, 0, 0),
775 MessageKind.COMPILER_CRASHED.error().toString(), 775 MessageKind.COMPILER_CRASHED.error().toString(),
776 api.Diagnostic.CRASH); 776 api.Diagnostic.CRASH);
777 String message = 'The compiler crashed.'; 777 String message = 'The compiler crashed.';
778 pleaseReportCrash(getAttachedStackTrace(error), message); 778 pleaseReportCrash(trace, message);
779 } 779 }
780 } catch (doubleFault) { 780 } catch (doubleFault) {
781 // Ignoring exceptions in exception handling. 781 // Ignoring exceptions in exception handling.
782 } 782 }
783 throw error; 783 throw error;
784 }).whenComplete(() { 784 }).whenComplete(() {
785 tracer.close(); 785 tracer.close();
786 totalCompileTime.stop(); 786 totalCompileTime.stop();
787 }).then((_) { 787 }).then((_) {
788 return !compilationFailed; 788 return !compilationFailed;
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
1631 1631
1632 void close() {} 1632 void close() {}
1633 1633
1634 toString() => name; 1634 toString() => name;
1635 1635
1636 /// Convenience method for getting an [api.CompilerOutputProvider]. 1636 /// Convenience method for getting an [api.CompilerOutputProvider].
1637 static NullSink outputProvider(String name, String extension) { 1637 static NullSink outputProvider(String name, String extension) {
1638 return new NullSink('$name.$extension'); 1638 return new NullSink('$name.$extension');
1639 } 1639 }
1640 } 1640 }
OLDNEW
« no previous file with comments | « pkg/unittest/lib/src/test_case.dart ('k') | sdk/lib/_internal/compiler/implementation/dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698