anchor.diff:  
   import 'compiler_context.dart' show CompilerContext;
   
  -import 'errors.dart' show InputError, inputError;
  +import 'errors.dart' show InputError, formatUnexpected, inputError, reportCrash;
   
   import 'kernel/kernel_target.dart' show KernelTarget;
   
  
positive.code: 
  import 'dart:convert' show JSON;
  
  import 'dart:io' show BytesBuilder, FileSystemEntity, exitCode;
  
  import 'package:kernel/binary/ast_to_binary.dart' show BinaryPrinter;
  
  
negative.code: 
  Future<CompilationResult> parseScript(
      Uri fileName, Uri packages, Uri patchedSdk, bool verbose) async {
    try {
      if (!await new File.fromUri(fileName).exists()) {
        return new CompilationResult.error(
            formatUnexpected(fileName, -1, "No such file."));
      }
      if (!await new Directory.fromUri(patchedSdk).exists()) {
        return new CompilationResult.error(
            formatUnexpected(patchedSdk, -1, "Patched sdk directory not found."));
      }
  
      Target target = getTarget("vm", new TargetFlags(strongMode: false));
  
      Program program;
      final uriTranslator = await TranslateUri.parse(null, packages);
      final Ticker ticker = new Ticker(isVerbose: verbose);
      final DillTarget dillTarget = new DillTarget(ticker, uriTranslator);
      dillTarget.read(patchedSdk.resolve('platform.dill'));
      final KernelTarget kernelTarget =
          new KernelTarget(dillTarget, uriTranslator);
      try {
        kernelTarget.read(fileName);
        await dillTarget.writeOutline(null);
        program = await kernelTarget.writeOutline(null);
        program = await kernelTarget.writeProgram(null);
        if (kernelTarget.errors.isNotEmpty) {
          return new CompilationResult.errors(kernelTarget.errors
              .map((err) => err.toString())
              .toList(growable: false));
        }
      } on InputError catch (e) {
        return new CompilationResult.error(e.format());
      }
  
      // Perform target-specific transformations.
      target.performModularTransformations(program);
      target.performGlobalTransformations(program);
  
      // Write the program to a list of bytes and return it.
      var sink = new ByteSink();
      new BinaryPrinter(sink).writeProgramFile(program);
      return new CompilationResult.ok(sink.builder.takeBytes());
    } catch (e, s) {
      return reportCrash(e, s, fileName);
    }
  }
  
  // TODO(ahe): https://github.com/dart-lang/sdk/issues/28316
  