| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 import 'dart:io'; | 5 import 'dart:io'; |
| 6 | 6 |
| 7 import 'dart:async' show | 7 import 'dart:async' show |
| 8 EventSink, | 8 EventSink, |
| 9 Future, | 9 Future, |
| 10 Stream, | 10 Stream, |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 break; | 146 break; |
| 147 } | 147 } |
| 148 } | 148 } |
| 149 } | 149 } |
| 150 } | 150 } |
| 151 | 151 |
| 152 /// Output provider which collects output in [output]. | 152 /// Output provider which collects output in [output]. |
| 153 class OutputProvider implements CompilerOutput { | 153 class OutputProvider implements CompilerOutput { |
| 154 final Map<String, String> output = new Map<String, String>(); | 154 final Map<String, String> output = new Map<String, String>(); |
| 155 | 155 |
| 156 EventSink<String> createSink(String name, String extension) { | 156 EventSink<String> createEventSink(String name, String extension) { |
| 157 return new StringEventSink((String data) { | 157 return new StringEventSink((String data) { |
| 158 output['$name.$extension'] = data; | 158 output['$name.$extension'] = data; |
| 159 }); | 159 }); |
| 160 } | 160 } |
| 161 | 161 |
| 162 String operator[](String key) => output[key]; | 162 String operator[](String key) => output[key]; |
| 163 } | 163 } |
| 164 | 164 |
| 165 /// Helper class to collect sources. | 165 /// Helper class to collect sources. |
| 166 class StringEventSink implements EventSink<String> { | 166 class StringEventSink implements EventSink<String> { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 202 |
| 203 final Stopwatch stopwatch; | 203 final Stopwatch stopwatch; |
| 204 | 204 |
| 205 final String updates; | 205 final String updates; |
| 206 | 206 |
| 207 CompilerEvent( | 207 CompilerEvent( |
| 208 this.kind, this.compiler, this._output, this.stopwatch, {this.updates}); | 208 this.kind, this.compiler, this._output, this.stopwatch, {this.updates}); |
| 209 | 209 |
| 210 String operator[](String key) => _output[key]; | 210 String operator[](String key) => _output[key]; |
| 211 } | 211 } |
| OLD | NEW |