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

Side by Side Diff: pkg/front_end/lib/src/incremental_kernel_generator_impl.dart

Issue 2980523003: Use precomputed uriBytes while computing cycle signature. (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
« no previous file with comments | « pkg/front_end/lib/src/incremental/file_state.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/incremental_kernel_generator.dart'; 8 import 'package:front_end/incremental_kernel_generator.dart';
9 import 'package:front_end/src/base/api_signature.dart'; 9 import 'package:front_end/src/base/api_signature.dart';
10 import 'package:front_end/src/base/performace_logger.dart'; 10 import 'package:front_end/src/base/performace_logger.dart';
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 var signatureBuilder = new ApiSignature(); 310 var signatureBuilder = new ApiSignature();
311 signatureBuilder.addBytes(_salt); 311 signatureBuilder.addBytes(_salt);
312 Set<FileState> transitiveFiles = cycle.libraries 312 Set<FileState> transitiveFiles = cycle.libraries
313 .map((library) => library.transitiveFiles) 313 .map((library) => library.transitiveFiles)
314 .expand((files) => files) 314 .expand((files) => files)
315 .toSet(); 315 .toSet();
316 signatureBuilder.addInt(transitiveFiles.length); 316 signatureBuilder.addInt(transitiveFiles.length);
317 317
318 // Append API signatures of transitive files. 318 // Append API signatures of transitive files.
319 for (var file in transitiveFiles) { 319 for (var file in transitiveFiles) {
320 signatureBuilder.addString(file.uri.toString()); 320 signatureBuilder.addBytes(file.uriBytes);
321 // TODO(scheglov): Stop using content hashes here, when Kernel stops 321 // TODO(scheglov): Stop using content hashes here, when Kernel stops
322 // copying methods of mixed-in classes. 322 // copying methods of mixed-in classes.
323 // https://github.com/dart-lang/sdk/issues/29881 323 // https://github.com/dart-lang/sdk/issues/29881
324 if (hasMixinApplication) { 324 if (hasMixinApplication) {
325 signatureBuilder.addBytes(file.contentHash); 325 signatureBuilder.addBytes(file.contentHash);
326 } else { 326 } else {
327 signatureBuilder.addBytes(file.apiSignature); 327 signatureBuilder.addBytes(file.apiSignature);
328 } 328 }
329 } 329 }
330 330
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 384
385 _LibraryCycleResult(this.cycle, this.signature, this.kernelLibraries); 385 _LibraryCycleResult(this.cycle, this.signature, this.kernelLibraries);
386 } 386 }
387 387
388 @visibleForTesting 388 @visibleForTesting
389 class _TestView { 389 class _TestView {
390 /// The list of [LibraryCycle]s compiled for the last delta. 390 /// The list of [LibraryCycle]s compiled for the last delta.
391 /// It does not include libraries which were read from the cache. 391 /// It does not include libraries which were read from the cache.
392 final List<LibraryCycle> compiledCycles = []; 392 final List<LibraryCycle> compiledCycles = [];
393 } 393 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/incremental/file_state.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698