anchor.diff:      print("  package-root: ${env.pkgRoot}");
     }
   
  -  port.receive((Message message, reply) {
  -    if (message.type == Message.RESULT) {
  -      mergeHitmaps(message.payload[0], globalHitmap);
  -      failedResolves.addAll(message.payload[1]);
  -      doneCnt++;
  -    }
  -
  -    // All workers are done. Process the data.
  -    if (doneCnt == env.workers) {
  -      workerPorts.forEach((p) => p.send(new Message(Message.SHUTDOWN, null)));
  -      if (env.verbose) {
  -        final end = new DateTime.now().millisecondsSinceEpoch;
  -        print("Done creating a global hitmap. Took ${end - start} ms.");
  -      }
  -
  -      Future out;
  -      if (env.prettyPrint) {
  -        out = prettyPrint(globalHitmap, failedLoads);
  -      }
  -      if (env.lcov) {
  -        out = lcov(globalHitmap);
  -      }
  -
  -      out.then((_) {
  -        env.output.close().then((_) {
  -          if (env.verbose) {
  -            final end = new DateTime.now().millisecondsSinceEpoch;
  -            print("Done flushing output. Took ${end - start} ms.");
  -          }
  -        });
  -        port.close();
  -
  -        if (env.verbose) {
  -          if (failedResolves.length > 0) {
  -            print("Failed to resolve:");
  -            failedResolves.toSet().forEach((e) {
  -              print("  ${e}");
  -            });
  -          }
  -          if (failedLoads.length > 0) {
  -            print("Failed to load:");
  -            failedLoads.toSet().forEach((e) {
  -              print("  ${e}");
  -            });
  -          }
  -        }
  -
  -      });
  -    }
  -  });
  -
     Map sharedEnv = {
       "sdkRoot": env.sdkRoot,
       "pkgRoot": env.pkgRoot,
  
positive.code:   return [new File(absPath)];
  }
  
  worker() {
    final start = new DateTime.now().millisecondsSinceEpoch;
    String me = currentMirrorSystem().isolate.debugName;
  
    port.receive((Message message, reply) {
      if (message.type == Message.SHUTDOWN) {
        port.close();
      }
  
      if (message.type == Message.WORK) {
        var env = message.payload[0];
        List files = message.payload[1];
        Resolver resolver = new Resolver(env);
        var workerHitmap = {};
        files.forEach((File fileEntry) {
          // Read file sync, as it only contains 1 object.
          String contents = fileEntry.readAsStringSync();
          if (contents.length > 0) {
            mergeHitmaps(createHitmap(contents, resolver), workerHitmap);
          }
        });
        if (env["verbose"]) {
          final end = new DateTime.now().millisecondsSinceEpoch;
          print("worker[${me}]: Finished processing files. "
                "Took ${end - start} ms.");
        }
        reply.send(new Message(Message.RESULT, [workerHitmap, resolver.failed]));
      }
  
    });
  }
  
  class Message {
    static const int SHUTDOWN = 1;
    static const int RESULT = 2;
    static const int WORK = 3;
  
    final int type;
    final payload;
  
    Message(this.type, this.payload);
  }
  
  final env = new Environment();
  
  main(List<String> arguments) {
    parseArgs(arguments);
  
    List files = filesToProcess(env.input);
    int filesPerWorker = files.length ~/ env.workers;
    List workerPorts = [];
    int doneCnt = 0;
  
    List failedResolves = [];
    List failedLoads = [];
  
negative.code: import "dart:convert";
  import "dart:io";
  import "dart:isolate";
  
  import "package:args/args.dart";
  import "package:path/path.dart";
  