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

Unified Diff: tests/compiler/dart2js/memory_compiler.dart

Issue 832363002: Remove Compiler.assembledCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix unittest Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
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) {}
« no previous file with comments | « tests/compiler/dart2js/js_backend_cps_ir_test.dart ('k') | tests/compiler/dart2js/mirror_helper_rename_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698