anchor.diff:    Expect.equals(0, collector.infos.length,
                   'Unexpected infos: ${collector.infos}');
     print('==================================================================');
  +  return result.compiler;
   }
   
  -Future testUri(Uri entrypoint, {bool suppressed: false}) async {
  -  await test(
  +Future<Compiler> testUri(Uri entrypoint,
  +                         {bool suppressed: false,
  +                          Compiler cachedCompiler}) async {
  +  cachedCompiler = await test(
         entrypoint,
         showPackageWarnings: true,
         suppressHints: false,
  -      hints: 1);
  -  await test(
  +      hints: 1,
  +      cachedCompiler: cachedCompiler);
  +  cachedCompiler = await test(
         entrypoint,
         showPackageWarnings: false,
         suppressHints: false,
  -      hints: suppressed ? 0 : 1);
  -  await test(
  +      hints: suppressed ? 0 : 1,
  +      cachedCompiler: cachedCompiler);
  +  cachedCompiler = await test(
         entrypoint,
         showPackageWarnings: true,
         suppressHints: true,
  -      hints: 0);
  -  await test(
  +      hints: 0,
  +      cachedCompiler: cachedCompiler);
  +  cachedCompiler = await test(
         entrypoint,
         showPackageWarnings: false,
         suppressHints: true,
  -      hints: 0);
  +      hints: 0,
  +      cachedCompiler: cachedCompiler);
  +  return cachedCompiler;
   }
   
   void main() {
     asyncTest(() async {
  -    await testUri(Uri.parse('memory:show_local.dart'));
  -    await testUri(Uri.parse('memory:hide_local.dart'));
  -    await testUri(Uri.parse('memory:show_package.dart'));
  -    await testUri(Uri.parse('memory:hide_package.dart'), suppressed: true);
  +    Compiler cachedCompiler = await testUri(
  +        Uri.parse('memory:show_local.dart'));
  +    cachedCompiler = await testUri(
  +        Uri.parse('memory:hide_local.dart'),
  +        cachedCompiler: cachedCompiler);
  +    cachedCompiler = await testUri(
  +        Uri.parse('memory:show_package.dart'),
  +        cachedCompiler: cachedCompiler);
  +    cachedCompiler = await testUri(
  +        Uri.parse('memory:hide_package.dart'),
  +        suppressed: true,
  +        cachedCompiler: cachedCompiler);
     });
   }
   
  
positive.code:     options.add(Flags.suppressHints);
    }
    var collector = new DiagnosticCollector();
    await runCompiler(
        entryPoint: entryPoint,
        memorySourceFiles: SOURCE,
        options: options,
        packageRoot: Uri.parse('memory:pkg/'),
        diagnosticHandler: collector);
    Expect.equals(0, collector.errors.length,
                  'Unexpected errors: ${collector.errors}');
    Expect.equals(0, collector.warnings.length,
  
negative.code:   'pkg/pkg/pkg.dart': '',
  };
  
  Future<Compiler> test(Uri entryPoint,
                        {bool showPackageWarnings: false,
                         bool suppressHints: false,
                         int hints: 0,
                         Compiler cachedCompiler}) async {
    print('==================================================================');
    print('test: $entryPoint showPackageWarnings=$showPackageWarnings '
          'suppressHints=$suppressHints');
    var options = [Flags.analyzeOnly];
    if (showPackageWarnings) {
      options.add(Flags.showPackageWarnings);
    }
  