Chromium Code Reviews| Index: pkg/front_end/lib/src/incremental_kernel_generator_impl.dart |
| diff --git a/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart b/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart |
| index ad86ecad33a76270ed55117786b3ca8a4e3f4f45..b9aada00881724d4e7810e464f3fa3daf492512d 100644 |
| --- a/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart |
| +++ b/pkg/front_end/lib/src/incremental_kernel_generator_impl.dart |
| @@ -63,6 +63,9 @@ class IncrementalKernelGeneratorImpl implements IncrementalKernelGenerator { |
| /// The URI of the program entry point. |
| final Uri _entryPoint; |
| + /// Latest compilation signatures produced by [computeDelta] for libraries. |
| + final Map<Uri, String> _uriToLatestSignature = {}; |
|
Siggi Cherem (dart-lang)
2017/05/17 18:15:10
optional style nit: consider dropping "_uriTo" fro
scheglov
2017/05/17 22:04:05
OK
Will do in https://codereview.chromium.org/2893
|
| + |
| /// The set of absolute file URIs that were reported through [invalidate] |
| /// and not checked for actual changes yet. |
| final Set<Uri> _invalidatedFiles = new Set<Uri>(); |
| @@ -102,10 +105,20 @@ class IncrementalKernelGeneratorImpl implements IncrementalKernelGenerator { |
| }); |
| Program program = new Program(nameRoot: nameRoot); |
| + |
| + // Add affected libraries (with different signatures). |
| for (_LibraryCycleResult result in results) { |
| - program.libraries.addAll(result.kernelLibraries); |
| + for (Library library in result.kernelLibraries) { |
| + Uri uri = library.importUri; |
| + if (_uriToLatestSignature[uri] != result.signature) { |
| + _uriToLatestSignature[uri] = result.signature; |
| + program.libraries.add(library); |
| + } |
| + } |
| } |
| + // TODO(scheglov) Add libraries which import changed libraries. |
| + |
| return new DeltaProgram(program); |
| }); |
| } |