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

Unified Diff: pkg/dartino_compiler/lib/src/worker/developer.dart

Issue 1987673002: Initial Implementation of the vm-service protocol (Closed) Base URL: git@github.com:dartino/sdk.git@master
Patch Set: Keep track of terminated state Created 4 years, 6 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/dartino_compiler/lib/src/verbs/infrastructure.dart ('k') | pkg/dartino_compiler/lib/vm_commands.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dartino_compiler/lib/src/worker/developer.dart
diff --git a/pkg/dartino_compiler/lib/src/worker/developer.dart b/pkg/dartino_compiler/lib/src/worker/developer.dart
index 2e9ba85a25356366232eebf3ad73584d100fded5..67af217fee316d1dcba0a01c06eee2d26c46e300 100644
--- a/pkg/dartino_compiler/lib/src/worker/developer.dart
+++ b/pkg/dartino_compiler/lib/src/worker/developer.dart
@@ -24,6 +24,9 @@ import 'dart:io' show
ProcessResult,
SocketException;
+import 'dart:typed_data' show
+ Uint8List;
+
import 'package:sdk_services/sdk_services.dart' show
OutputService,
SDKServices,
@@ -83,8 +86,7 @@ import '../verbs/infrastructure.dart' show
throwFatalError;
import '../../vm_context.dart' show
- DartinoVmContext,
- SinkDebugListener;
+ DartinoVmContext;
import '../../incremental/dartino_compiler_incremental.dart' show
IncrementalCompilationFailed;
@@ -131,6 +133,8 @@ import '../vm_connection.dart' show
import '../dartino_compiler_options.dart' show
DartinoCompilerOptions;
+import '../../vm_context.dart' show DebugListener;
+
import '../hub/exit_codes.dart' show
INPUT_ERROR;
@@ -259,6 +263,22 @@ Future<Null> attachToVmTcp(String host, int port, SessionState state) async {
await attachToVm(connection, state);
}
+class SinkDebugListener extends DebugListener {
+ final Sink stdoutSink;
+ final Sink stderrSink;
+ SinkDebugListener(this.stdoutSink, this.stderrSink);
+
+ // Notification of bytes written to stdout.
+ writeStdOut(int processId, Uint8List data) {
+ stdoutSink.add(data);
+ }
+
+ // Notification of bytes written stderr.
+ writeStdErr(int processId, Uint8List data) {
+ stderrSink.add(data);
+ }
+}
+
Future<Null> attachToVm(
VmConnection connection,
SessionState state,
« no previous file with comments | « pkg/dartino_compiler/lib/src/verbs/infrastructure.dart ('k') | pkg/dartino_compiler/lib/vm_commands.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698