anchor.diff:  
         // This is the incremental program.
         Procedure mainMethod = programWithDill == null
  -          ? userLoadedUriMain
  +          ? data.userLoadedUriMain
             : programWithDill.mainMethod;
  -      return new Program(libraries: libraries, uriToSource: uriToSource)
  +      return new Program(libraries: libraries, uriToSource: data.uriToSource)
           ..mainMethod = mainMethod;
       });
  +  }
  +
  +  prepareSummary(List<int> summaryBytes, UriTranslator uriTranslator,
  +      CompilerContext c, IncrementalCompilerData data) {
  +    dillLoadedData = new DillTarget(ticker, uriTranslator, c.options.target);
  +    int bytesLength = 0;
  +
  +    if (summaryBytes != null) {
  +      ticker.logMs("Read ${c.options.sdkSummary}");
  +      data.program = new Program();
  +      new BinaryBuilder(summaryBytes, disableLazyReading: false)
  +          .readProgram(data.program);
  +      ticker.logMs("Deserialized ${c.options.sdkSummary}");
  +      bytesLength += summaryBytes.length;
  +    }
  +
  +    return bytesLength;
  +  }
  +
  +  // This procedure will try to load the dill file and will crash if it cannot.
  +  Future<int> bootstrapFromDill(List<int> summaryBytes, CompilerContext c,
  +      IncrementalCompilerData data) async {
  +    int bytesLength = 0;
  +    FileSystemEntity entity = c.options.fileSystem.entityForUri(bootstrapDill);
  +    if (await entity.exists()) {
  +      List<int> bootstrapBytes = await entity.readAsBytes();
  +      if (bootstrapBytes != null) {
  +        Set<Uri> prevLibraryUris = new Set<Uri>.from(
  +            data.program.libraries.map((Library lib) => lib.importUri));
  +        ticker.logMs("Read $bootstrapDill");
  +
  +        // We're going to output all we read here so lazy loading it
  +        // doesn't make sense.
  +        new BinaryBuilder(bootstrapBytes, disableLazyReading: true)
  +            .readProgram(data.program);
  +
  +        bootstrapSuccess = true;
  +        bytesLength += bootstrapBytes.length;
  +        for (Library lib in data.program.libraries) {
  +          if (prevLibraryUris.contains(lib.importUri)) continue;
  +          data.importUriToOrder[lib.importUri] = data.importUriToOrder.length;
  +        }
  +        data.userLoadedUriMain = data.program.mainMethod;
  +        data.includeUserLoadedLibraries = true;
  +        data.uriToSource.addAll(data.program.uriToSource);
  +      }
  +    }
  +    return bytesLength;
  +  }
  +
  +  void appendedLibraries(IncrementalCompilerData data, int bytesLength) {
  +    if (data.program != null) {
  +      dillLoadedData.loader
  +          .appendLibraries(data.program, byteCount: bytesLength);
  +    }
  +    ticker.logMs("Appended libraries");
     }
   
     List<LibraryBuilder> computeReusedLibraries(Iterable<Uri> invalidatedUris) {
  
positive.code:     ticker.reset();
      entryPoint ??= context.options.inputs.single;
      return context.runInContext<Future<Program>>((CompilerContext c) async {
        bool includeUserLoadedLibraries = false;
        Map<Uri, Source> uriToSource = {};
        Map<Uri, int> importUriToOrder = {};
        Procedure userLoadedUriMain;
        bootstrapSuccess = false;
        if (dillLoadedData == null) {
          UriTranslator uriTranslator = await c.options.getUriTranslator();
          ticker.logMs("Read packages file");
  
          dillLoadedData =
              new DillTarget(ticker, uriTranslator, c.options.target);
          List<int> summaryBytes = await c.options.loadSdkSummaryBytes();
          int bytesLength = 0;
          Program program;
          if (summaryBytes != null) {
            ticker.logMs("Read ${c.options.sdkSummary}");
            program = new Program();
            new BinaryBuilder(summaryBytes, disableLazyReading: false)
                .readProgram(program);
            ticker.logMs("Deserialized ${c.options.sdkSummary}");
            bytesLength += summaryBytes.length;
          }
  
          if (bootstrapDill != null) {
            FileSystemEntity entity =
                c.options.fileSystem.entityForUri(bootstrapDill);
            if (await entity.exists()) {
              List<int> bootstrapBytes = await entity.readAsBytes();
              if (bootstrapBytes != null) {
                Set<Uri> prevLibraryUris = new Set<Uri>.from(
                    program.libraries.map((Library lib) => lib.importUri));
                ticker.logMs("Read $bootstrapDill");
                bool bootstrapFailed = false;
                try {
                  // We're going to output all we read here so lazy loading it
                  // doesn't make sense.
                  new BinaryBuilder(bootstrapBytes, disableLazyReading: true)
                      .readProgram(program);
                } catch (e) {
                  bootstrapFailed = true;
                  program = new Program();
                  new BinaryBuilder(summaryBytes, disableLazyReading: false)
                      .readProgram(program);
                }
                if (!bootstrapFailed) {
                  bootstrapSuccess = true;
                  bytesLength += bootstrapBytes.length;
                  for (Library lib in program.libraries) {
                    if (prevLibraryUris.contains(lib.importUri)) continue;
                    importUriToOrder[lib.importUri] = importUriToOrder.length;
                  }
                  userLoadedUriMain = program.mainMethod;
                  includeUserLoadedLibraries = true;
                  uriToSource.addAll(program.uriToSource);
                }
              }
            }
          }
          summaryBytes = null;
          if (program != null) {
            dillLoadedData.loader
                .appendLibraries(program, byteCount: bytesLength);
          }
          ticker.logMs("Appended libraries");
          await dillLoadedData.buildOutlines();
          userBuilders = <Uri, LibraryBuilder>{};
          platformBuilders = <LibraryBuilder>[];
          dillLoadedData.loader.builders.forEach((uri, builder) {
  
negative.code:         // For now ensure original order of libraries to produce bit-perfect
          // output.
          libraries.sort((a, b) {
            int aOrder = data.importUriToOrder[a.importUri];
            int bOrder = data.importUriToOrder[b.importUri];
            if (aOrder != null && bOrder != null) return aOrder - bOrder;
            if (aOrder != null) return -1;
            if (bOrder != null) return 1;
  