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

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

Issue 824103005: Revert "Remove Compiler.assembledCode." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/output_collector.dart
diff --git a/tests/compiler/dart2js/output_collector.dart b/tests/compiler/dart2js/output_collector.dart
deleted file mode 100644
index c6bc101a7f8b22f99ba065704aec89a46b69ff7a..0000000000000000000000000000000000000000
--- a/tests/compiler/dart2js/output_collector.dart
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Output provider that collects the output in string buffers.
-
-library output_collector;
-
-import 'dart:async';
-
-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;
- }
-}
« no previous file with comments | « tests/compiler/dart2js/mock_compiler.dart ('k') | tests/compiler/dart2js/source_map_d2js_validity_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698