Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: pkg/front_end/lib/src/incremental/kernel_driver.dart

Issue 2975143002: Remove KernelDriver/IKG.invalidateAll(). (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:front_end/file_system.dart'; 7 import 'package:front_end/file_system.dart';
8 import 'package:front_end/src/base/api_signature.dart'; 8 import 'package:front_end/src/base/api_signature.dart';
9 import 'package:front_end/src/base/performace_logger.dart'; 9 import 'package:front_end/src/base/performace_logger.dart';
10 import 'package:front_end/src/fasta/dill/dill_library_builder.dart'; 10 import 'package:front_end/src/fasta/dill/dill_library_builder.dart';
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 /// file state prior the next invocation of [getKernel] returns the result. 158 /// file state prior the next invocation of [getKernel] returns the result.
159 /// 159 ///
160 /// Invocation of this method will not prevent a [Future] returned from 160 /// Invocation of this method will not prevent a [Future] returned from
161 /// [getKernel] from completing with a result, but the result is not 161 /// [getKernel] from completing with a result, but the result is not
162 /// guaranteed to be consistent with the new current file state after this 162 /// guaranteed to be consistent with the new current file state after this
163 /// [invalidate] invocation. 163 /// [invalidate] invocation.
164 void invalidate(Uri uri) { 164 void invalidate(Uri uri) {
165 _invalidatedFiles.add(uri); 165 _invalidatedFiles.add(uri);
166 } 166 }
167 167
168 /// Flush the current file state completely.
169 ///
170 /// TODO(scheglov) Do we really need this functionality?
171 void invalidateAll() {
172 _invalidatedFiles.addAll(_fsState.fileUris);
173 }
174
175 /// Ensure that [dillTarget] includes the [cycle] libraries. It already 168 /// Ensure that [dillTarget] includes the [cycle] libraries. It already
176 /// contains all the libraries that sorted before the given [cycle] in 169 /// contains all the libraries that sorted before the given [cycle] in
177 /// topological order. Return the result with the cycle libraries. 170 /// topological order. Return the result with the cycle libraries.
178 Future<LibraryCycleResult> _compileCycle( 171 Future<LibraryCycleResult> _compileCycle(
179 CanonicalName nameRoot, DillTarget dillTarget, LibraryCycle cycle) async { 172 CanonicalName nameRoot, DillTarget dillTarget, LibraryCycle cycle) async {
180 return _logger.runAsync('Compile cycle $cycle', () async { 173 return _logger.runAsync('Compile cycle $cycle', () async {
181 String signature = _getCycleSignature(cycle); 174 String signature = _getCycleSignature(cycle);
182 175
183 _logger.writeln('Signature: $signature.'); 176 _logger.writeln('Signature: $signature.');
184 var kernelKey = '$signature.kernel'; 177 var kernelKey = '$signature.kernel';
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 360
368 LibraryCycleResult(this.cycle, this.signature, this.kernelLibraries); 361 LibraryCycleResult(this.cycle, this.signature, this.kernelLibraries);
369 } 362 }
370 363
371 @visibleForTesting 364 @visibleForTesting
372 class _TestView { 365 class _TestView {
373 /// The list of [LibraryCycle]s compiled for the last delta. 366 /// The list of [LibraryCycle]s compiled for the last delta.
374 /// It does not include libraries which were read from the cache. 367 /// It does not include libraries which were read from the cache.
375 final List<LibraryCycle> compiledCycles = []; 368 final List<LibraryCycle> compiledCycles = [];
376 } 369 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/incremental_kernel_generator.dart ('k') | pkg/front_end/lib/src/incremental_kernel_generator_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698