Index: pkg/dartino_compiler/lib/src/hub/hub_main.dart |
diff --git a/pkg/fletchc/lib/src/hub/hub_main.dart b/pkg/dartino_compiler/lib/src/hub/hub_main.dart |
similarity index 95% |
rename from pkg/fletchc/lib/src/hub/hub_main.dart |
rename to pkg/dartino_compiler/lib/src/hub/hub_main.dart |
index 00f0460d21a1c607205834fd77663a0b893ad274..91b54491ff1726d9180e6ac1770c0effcbb81c6f 100644 |
--- a/pkg/fletchc/lib/src/hub/hub_main.dart |
+++ b/pkg/dartino_compiler/lib/src/hub/hub_main.dart |
@@ -2,7 +2,7 @@ |
// 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. |
-library fletchc.hub_main; |
+library dartino_compiler.hub_main; |
import 'dart:collection' show |
Queue; |
@@ -133,7 +133,7 @@ class ClientCommandTransformerBuilder |
} |
// Class for sending client commands from the hub (main isolate) to the |
-// fletch c++ client. |
+// dartino c++ client. |
class ClientCommandSender extends CommandSender { |
final Sink<List<int>> sink; |
@@ -163,14 +163,14 @@ class ClientCommandSender extends CommandSender { |
} |
Future main(List<String> arguments) async { |
- // When running this program, -Dfletch.version must be provided on the Dart |
+ // When running this program, -Ddartino.version must be provided on the Dart |
// VM command line. |
- assert(const String.fromEnvironment('fletch.version') != null); |
+ assert(const String.fromEnvironment('dartino.version') != null); |
mainArguments.addAll(arguments); |
configFileUri = Uri.base.resolve(arguments.first); |
File configFile = new File.fromUri(configFileUri); |
- Directory tmpdir = Directory.systemTemp.createTempSync("fletch_client"); |
+ Directory tmpdir = Directory.systemTemp.createTempSync("dartino_client"); |
File socketFile = new File("${tmpdir.path}/socket"); |
try { |
@@ -334,9 +334,9 @@ class ClientVerbContext extends VerbContext { |
} |
} |
-/// Handles communication with the Fletch C++ client. |
+/// Handles communication with the Dartino C++ client. |
class ClientConnection { |
- /// Socket used for receiving and sending commands from/to the Fletch C++ |
+ /// Socket used for receiving and sending commands from/to the Dartino C++ |
/// client. |
final Socket socket; |
@@ -349,7 +349,7 @@ class ClientConnection { |
final ClientLogger log; |
- /// The commandSender is used to send commands back to the Fletch C++ client. |
+ /// The commandSender is used to send commands back to the Dartino C++ client. |
ClientCommandSender commandSender; |
StreamSubscription<ClientCommand> subscription; |
@@ -361,12 +361,12 @@ class ClientConnection { |
/// Updated by [parseArguments]. |
AnalyzedSentence sentence; |
- /// Path to the fletch VM. Updated by [parseArguments]. |
- String fletchVm; |
+ /// Path to the dartino VM. Updated by [parseArguments]. |
+ String dartinoVm; |
ClientConnection(this.socket, this.log); |
- /// Stream of commands from the Fletch C++ client to the hub (main isolate). |
+ /// Stream of commands from the Dartino C++ client to the hub (main isolate). |
/// The commands are typically forwarded to a worker isolate, see |
/// handleClientCommand. |
Stream<ClientCommand> get commands => controller.stream; |
@@ -380,10 +380,10 @@ class ClientConnection { |
/// Start processing commands from the client. |
void start() { |
// Setup a command sender used to send responses from the hub (main isolate) |
- // back to the Fletch C++ client. |
+ // back to the Dartino C++ client. |
commandSender = new ClientCommandSender(socket); |
- // Setup a listener for handling commands coming from the Fletch C++ |
+ // Setup a listener for handling commands coming from the Dartino C++ |
// client. |
StreamTransformer<List<int>, ClientCommand> transformer = |
new ClientCommandTransformerBuilder().build(); |
@@ -426,7 +426,7 @@ class ClientConnection { |
completer.complete(); |
} |
- // Send a command back to the Fletch C++ client. |
+ // Send a command back to the Dartino C++ client. |
void sendCommandToClient(ClientCommand command) { |
switch (command.code) { |
case ClientCommandCode.Stdout: |
@@ -479,12 +479,12 @@ class ClientConnection { |
Options options = Options.parse(arguments); |
Sentence sentence = |
parseSentence(options.nonOptionArguments, includesProgramName: true); |
- // [programName] is the canonicalized absolute path to the fletch |
+ // [programName] is the canonicalized absolute path to the dartino |
// executable (the C++ program). |
String programName = sentence.programName; |
- String fletchVm = "$programName-vm"; |
+ String dartinoVm = "$programName-vm"; |
this.sentence = analyzeSentence(sentence, options); |
- this.fletchVm = fletchVm; |
+ this.dartinoVm = dartinoVm; |
return this.sentence; |
} |
@@ -518,7 +518,7 @@ class WorkerConnection { |
/// workerCommands is an iterator over all the commands coming from the |
/// worker isolate. These are typically the outbound messages destined for |
- /// the Fletch C++ client. |
+ /// the Dartino C++ client. |
/// It iterates over the data coming on the receivePort. |
StreamIterator<ClientCommand> workerCommands; |
@@ -556,7 +556,7 @@ class WorkerConnection { |
sendPort = command.data; |
} |
- /// Attach to a fletch C++ client and forward commands to the worker isolate, |
+ /// Attach to a dartino C++ client and forward commands to the worker isolate, |
/// and vice versa. The returned future normally completes when the worker |
/// isolate sends ClientCommandCode.ClosePort, or if the isolate is killed due |
/// to ClientCommandCode.Signal arriving through client.commands. |
@@ -580,7 +580,7 @@ class WorkerConnection { |
} |
// Method for handling commands coming back from the worker isolate. |
- // It typically forwards them to the Fletch C++ client via the |
+ // It typically forwards them to the Dartino C++ client via the |
// clientConnection. |
Future<int> handleCommandsFromWorker( |
ClientConnection clientConnection) async { |
@@ -630,7 +630,7 @@ class WorkerConnection { |
}); |
errorSubscription.resume(); |
- // Start listening for commands coming from the Fletch C++ client (via |
+ // Start listening for commands coming from the Dartino C++ client (via |
// clientConnection). |
// TODO(ahe): Add onDone event handler to detach the client. |
clientConnection.commands.listen(handleCommandsFromClient); |
@@ -683,7 +683,7 @@ class WorkerConnection { |
clientConnection.sendCommandToWorker( |
new ClientCommand(ClientCommandCode.PerformTask, task)); |
- // Forward commands between the C++ fletch client [clientConnection], and the |
+ // Forward commands between the C++ dartino client [clientConnection], and the |
Søren Gjesse
2016/02/03 12:06:54
Long line.
ricow1
2016/02/03 12:29:18
Done.
|
// worker isolate `this`. Also, Intercept the signal command and |
// potentially kill the isolate (the isolate needs to tell if it is |
// interuptible or needs to be killed, an example of the latter is, if |