Index: tests/compiler/dart2js/memory_compiler.dart |
diff --git a/tests/compiler/dart2js/memory_compiler.dart b/tests/compiler/dart2js/memory_compiler.dart |
index 88bc8e217c5f6fd8b1ad541ed206829bdb2750db..017db0a1428b298106fc84b848977a2c40b87776 100644 |
--- a/tests/compiler/dart2js/memory_compiler.dart |
+++ b/tests/compiler/dart2js/memory_compiler.dart |
@@ -20,6 +20,8 @@ import 'package:compiler/src/mirrors/analyze.dart'; |
import 'package:compiler/src/library_loader.dart' |
show LoadedLibraries; |
+export 'output_collector.dart'; |
+ |
class DiagnosticMessage { |
final Uri uri; |
final int begin; |
@@ -62,41 +64,6 @@ class DiagnosticCollector { |
} |
} |
-class BufferedEventSink implements EventSink<String> { |
- StringBuffer sb = new StringBuffer(); |
- String text; |
- |
- void add(String event) { |
- sb.write(event); |
- } |
- |
- void addError(errorEvent, [StackTrace stackTrace]) { |
- // Do not support this. |
- } |
- |
- void close() { |
- text = sb.toString(); |
- sb = null; |
- } |
-} |
- |
-class OutputCollector { |
- Map<String, Map<String, BufferedEventSink>> outputMap = {}; |
- |
- EventSink<String> call(String name, String extension) { |
- Map<String, BufferedEventSink> sinkMap = |
- outputMap.putIfAbsent(extension, () => {}); |
- return sinkMap.putIfAbsent(name, () => new BufferedEventSink()); |
- } |
- |
- String getOutput(String name, String extension) { |
- Map<String, BufferedEventSink> sinkMap = outputMap[extension]; |
- if (sinkMap == null) return null; |
- BufferedEventSink sink = sinkMap[name]; |
- return sink != null ? sink.text : null; |
- } |
-} |
- |
DiagnosticHandler createDiagnosticHandler(DiagnosticHandler diagnosticHandler, |
SourceFileProvider provider, |
bool showDiagnostics) { |
@@ -241,7 +208,7 @@ class MemoryLoadedLibraries implements LoadedLibraries { |
bool containsLibrary(Uri uri) => copiedLibraries.containsKey(uri); |
@override |
- void forEachImportChain(f) {} |
+ void forEachImportChain(f, {callback}) {} |
@override |
void forEachLibrary(f) {} |