| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_incremental; | 5 part of dart2js_incremental; |
| 6 | 6 |
| 7 /// Do not call this method directly. It will be made private. | 7 /// Do not call this method directly. It will be made private. |
| 8 // TODO(ahe): Make this method private. | 8 // TODO(ahe): Make this method private. |
| 9 Future<Compiler> reuseCompiler( | 9 Future<Compiler> reuseCompiler( |
| 10 {CompilerDiagnostics diagnosticHandler, | 10 {CompilerDiagnostics diagnosticHandler, |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 void close() { | 179 void close() { |
| 180 if (data != null) { | 180 if (data != null) { |
| 181 onClose(data.join()); | 181 onClose(data.join()); |
| 182 data = null; | 182 data = null; |
| 183 } | 183 } |
| 184 } | 184 } |
| 185 } | 185 } |
| 186 | 186 |
| 187 /// Output provider which collect output in [output]. | 187 /// Output provider which collect output in [output]. |
| 188 class OutputProvider { | 188 class OutputProvider implements CompilerOutput { |
| 189 final Map<String, String> output = new Map<String, String>(); | 189 final Map<String, String> output = new Map<String, String>(); |
| 190 | 190 |
| 191 EventSink<String> call(String name, String extension) { | 191 EventSink<String> createEventSink(String name, String extension) { |
| 192 return new StringEventSink((String data) { | 192 return new StringEventSink((String data) { |
| 193 output['$name.$extension'] = data; | 193 output['$name.$extension'] = data; |
| 194 }); | 194 }); |
| 195 } | 195 } |
| 196 | 196 |
| 197 String operator[] (String key) => output[key]; | 197 String operator[] (String key) => output[key]; |
| 198 } | 198 } |
| OLD | NEW |