anchor.diff:  import '../barback.dart';
   import '../dart.dart' as dart;
   import '../io.dart';
  +import '../pool.dart';
   import '../utils.dart';
   import 'build_environment.dart';
   
  
positive.code: /// A [Transformer] that uses dart2js's library API to transform Dart
  /// entrypoints in "web" to JavaScript.
  class Dart2JSTransformer extends Transformer implements LazyTransformer {
    final BuildEnvironment _environment;
    final BarbackSettings _settings;
  
    /// If this is non-null, then the transformer is currently being applied, so
    /// subsequent calls to [apply] will wait for this to finish before
    /// proceeding.
    ///
    /// Dart2js uses lots of memory, so if we try to actually run compiles in
    /// parallel, it takes down the VM. Instead, the transformer will force
    /// all applies to be sequential. The tracking bug to do something better
    /// is here: https://code.google.com/p/dart/issues/detail?id=14730.
    Future _running;
  
    Dart2JSTransformer.withSettings(this._environment, this._settings) {
      var invalidOptions = _settings.configuration.keys.toSet()
  
negative.code:   }
  
    Future apply(Transform transform) {
      var stopwatch = new Stopwatch();
  
      // Wait for any ongoing apply to finish first.
      return _pool.withResource(() {
        transform.logger.info("Compiling ${transform.primaryInput.id}...");
        stopwatch.start();
  
        return transform.primaryInput.readAsString().then((code) {
          try {
            var id = transform.primaryInput.id;
            var name = id.path;
            if (id.package != _environment.rootPackage.name) {
              name += " in ${id.package}";
            }
  
            var parsed = parseCompilationUnit(code, name: name);
            if (!dart.isEntrypoint(parsed)) return null;
          } on AnalyzerErrorGroup catch (e) {
            transform.logger.error(e.message);
            return null;
          }
  
          var provider = new _BarbackCompilerProvider(_environment, transform);
  
          // Create a "path" to the entrypoint script. The entrypoint may not
          // actually be on disk, but this gives dart2js a root to resolve
          // relative paths against.
          var id = transform.primaryInput.id;
  
          var entrypoint = path.join(_environment.graph.packages[id.package].dir,
              id.path);
  
          // TODO(rnystrom): Should have more sophisticated error-handling here.
          // Need to report compile errors to the user in an easily visible way.
          // Need to make sure paths in errors are mapped to the original source
          // path so they can understand them.
          return Chain.track(dart.compile(
              entrypoint, provider,
              commandLineOptions: _configCommandLineOptions,
              checked: _configBool('checked'),
              minify: _configBool(
                  'minify', defaultsTo: _settings.mode == BarbackMode.RELEASE),
              verbose: _configBool('verbose'),
              environment: _configEnvironment,
              packageRoot: path.join(_environment.rootPackage.dir,
                                     "packages"),
              analyzeAll: _configBool('analyzeAll'),
              suppressWarnings: _configBool('suppressWarnings'),
              suppressHints: _configBool('suppressHints'),
              terse: _configBool('terse'))).then((_) {
            stopwatch.stop();
            transform.logger.info("Took ${stopwatch.elapsed} to compile $id.");
          });
        });
      });
    }
  
  