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

Unified Diff: pkg/fletchc/lib/vm_command_reader.dart

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 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
« no previous file with comments | « pkg/fletchc/lib/src/zone_helper.dart ('k') | pkg/fletchc/lib/vm_commands.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/fletchc/lib/vm_command_reader.dart
diff --git a/pkg/fletchc/lib/vm_command_reader.dart b/pkg/fletchc/lib/vm_command_reader.dart
deleted file mode 100644
index 79081f8f2ddc156a2ed6665929909fbf21c553d7..0000000000000000000000000000000000000000
--- a/pkg/fletchc/lib/vm_command_reader.dart
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2015, the Dartino 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.md file.
-
-part of fletch.vm_session;
-
-class SessionCommandTransformerBuilder
- extends CommandTransformerBuilder<VmCommand> {
-
- VmCommand makeCommand(int code, ByteData payload) {
- return new VmCommand.fromBuffer(
- VmCommandCode.values[code], toUint8ListView(payload));
- }
-}
-
-class VmCommandReader {
- final StreamIterator<VmCommand> iterator;
-
- VmCommandReader(
- Stream<List<int>> stream,
- Sink<List<int>> stdoutSink,
- Sink<List<int>> stderrSink)
- : iterator = new StreamIterator<VmCommand>(
- filterCommandStream(stream, stdoutSink, stderrSink));
-
- static Stream<VmCommand> filterCommandStream(
- Stream<List<int>> stream,
- Sink<List<int>> stdoutSink,
- Sink<List<int>> stderrSink) async* {
- // When done with the data on the socket, we do not close
- // stdoutSink and stderrSink. They are usually stdout and stderr
- // and the user will probably want to add more on those streams
- // independently of the messages added here.
- StreamTransformer<List<int>, VmCommand> transformer =
- new SessionCommandTransformerBuilder().build();
- await for (VmCommand command in stream.transform(transformer)) {
- if (command is StdoutData) {
- if (stdoutSink != null) stdoutSink.add(command.value);
- } else if (command is StderrData) {
- if (stderrSink != null) stderrSink.add(command.value);
- } else {
- yield command;
- }
- }
- }
-}
« no previous file with comments | « pkg/fletchc/lib/src/zone_helper.dart ('k') | pkg/fletchc/lib/vm_commands.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698