anchor.diff:        programSplitConstraintsData = constraintParser.read(programSplitJson);
       }
   
  -    if (options.cfeOnly) {
  -      await runLoadKernel();
  -    } else if (options.modularMode) {
  -      await runModularAnalysis();
  -    } else {
  +    await selfTask.measureSubtask("compileFromKernel", () async {
         await runSequentialPhases();
  -    }
  +    });
     }
   
     /// Clear the internal compiler state to prevent memory leaks when invoking
  
positive.code:   bool get shouldStopAfterCodegen => options.writeCodegenUri != null;
  
    void runSequentialPhases() async {
      await selfTask.measureSubtask("compileFromKernel", () async {
        // Load kernel and compute closed world.
        ClosedWorldAndIndices closedWorldAndIndices = await produceClosedWorld();
        if (shouldStopAfterClosedWorld(closedWorldAndIndices)) return;
  
        // Run global analysis.
        GlobalTypeInferenceResults globalTypeInferenceResults =
            await produceGlobalTypeInferenceResults(closedWorldAndIndices);
        if (shouldStopAfterGlobalTypeInference) return;
  
        // Run codegen.
        CodegenResults codegenResults = await produceCodegenResults(
            globalTypeInferenceResults, closedWorldAndIndices.indices);
        if (shouldStopAfterCodegen) return;
  
        // Link.
        int programSize = runCodegenEnqueuer(codegenResults);
  
        // Dump Info.
        if (options.dumpInfo) {
          runDumpInfo(codegenResults, programSize);
        }
      });
    }
  
    void runDumpInfo(CodegenResults codegenResults, int programSize) {
  
negative.code:     return closedWorld;
    }
  
    Future<load_kernel.Output> loadKernel() async {
      final input = load_kernel.Input(options, provider, reporter,
          initializedCompilerState, forceSerializationForTesting);
      load_kernel.Output output =
          await loadKernelTask.measure(() async => load_kernel.run(input));
      reporter.log("Kernel load complete");
      return output;
    }
  
    Future<load_kernel.Output> produceKernel() async {
      if (options.readClosedWorldUri == null) {
        load_kernel.Output output = await loadKernel();
        if (output == null || compilationFailed) return null;
        ir.Component component = output.component;
        if (retainDataForTesting) {
          componentForTesting = component;
        }
        if (options.features.newDumpInfo.isEnabled && options.dumpInfo) {
          untrimmedComponentForDumpInfo = component;
        }
        if (options.cfeOnly) {
          if (options.fromDill) {
            List<Uri> libraries = output.libraries;
            if (options.dumpUnusedLibraries) {
              dumpUnusedLibraries(component, libraries);
            }
            if (options.entryUri != null) {
              component = trimComponent(component, libraries);
            }
          }
          await serializationTask.serializeComponent(component);
        }
        // We currently do not return the trimmed component from [produceKernel]
        // because downstream phases, in particular modular analysis, currently
        // depend on the untrimmed dill.
        return output;
      } else {
        ir.Component component =
            await serializationTask.deserializeComponentAndUpdateOptions();
        return load_kernel.Output(component, null, null, null, null);
      }
    }
  
    bool shouldStopAfterLoadKernel(load_kernel.Output output) =>
        output == null || compilationFailed || options.cfeOnly;
  
    Future<ModuleData> runModularAnalysis(
        load_kernel.Output output, Set<Uri> moduleLibraries) async {
      ir.Component component = output.component;
      List<Uri> libraries = output.libraries;
      _userCodeLocations
          .addAll(moduleLibraries.map((module) => CodeLocation(module)));
      final input = modular_analysis.Input(
          options, reporter, environment, component, libraries, moduleLibraries);
      return await selfTask.measureSubtask(
          'runModularAnalysis', () async => modular_analysis.run(input));
    }
  
    Future<List<ModuleData>> produceModuleData(load_kernel.Output output) async {
      ir.Component component = output.component;
      if (options.modularMode) {
        Set<Uri> moduleLibraries = output.moduleLibraries.toSet();
        ModuleData moduleData = await runModularAnalysis(output, moduleLibraries);
        if (options.writeModularAnalysisUri != null && !compilationFailed) {
          serializationTask.testModuleSerialization(moduleData, component);
          serializationTask.serializeModuleData(
              moduleData, component, moduleLibraries);
        }
        return [moduleData];
      } else {
        return await serializationTask.deserializeModuleData(component);
      }
    }
  
    bool get shouldStopAfterModularAnalysis =>
        compilationFailed || options.writeModularAnalysisUri != null;
  
    GlobalTypeInferenceResults performGlobalTypeInference(
        JClosedWorld closedWorld) {
  