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

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

Issue 12154006: Remove Sink and move CollectionSink to async. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 months 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 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 if (condition is Function){ 1101 if (condition is Function){
1102 condition = condition(); 1102 condition = condition();
1103 } 1103 }
1104 if (spannable == null || !condition) { 1104 if (spannable == null || !condition) {
1105 throw new SpannableAssertionFailure(spannable, message); 1105 throw new SpannableAssertionFailure(spannable, message);
1106 } 1106 }
1107 return true; 1107 return true;
1108 } 1108 }
1109 1109
1110 /// A sink that drains into /dev/null. 1110 /// A sink that drains into /dev/null.
1111 class NullSink extends Sink<String> { 1111 class NullSink extends StreamSink<String> {
1112 final String name; 1112 final String name;
1113 1113
1114 NullSink(this.name); 1114 NullSink(this.name);
1115 1115
1116 add(String value) {} 1116 add(String value) {}
1117 1117
1118 void signalError(AsyncError error) {}
Lasse Reichstein Nielsen 2013/02/04 13:21:10 Consider throwing the error.
ahe 2013/02/04 15:27:30 The error should be thrown. You should *never* ign
1119
1118 void close() {} 1120 void close() {}
1119 1121
1120 toString() => name; 1122 toString() => name;
1121 1123
1122 /// Convenience method for getting an [api.CompilerOutputProvider]. 1124 /// Convenience method for getting an [api.CompilerOutputProvider].
1123 static NullSink outputProvider(String name, String extension) { 1125 static NullSink outputProvider(String name, String extension) {
1124 return new NullSink('$name.$extension'); 1126 return new NullSink('$name.$extension');
1125 } 1127 }
1126 } 1128 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698