| OLD | NEW |
| 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 import 'dart:io'; | 6 import 'dart:io'; |
| 7 | 7 |
| 8 import 'package:front_end/file_system.dart'; | 8 import 'package:front_end/file_system.dart'; |
| 9 import 'package:front_end/incremental_kernel_generator.dart'; | 9 import 'package:front_end/incremental_kernel_generator.dart'; |
| 10 import 'package:front_end/src/base/api_signature.dart'; | 10 import 'package:front_end/src/base/api_signature.dart'; |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 Set<FileState> transitiveFiles = cycle.libraries | 322 Set<FileState> transitiveFiles = cycle.libraries |
| 323 .map((library) => library.transitiveFiles) | 323 .map((library) => library.transitiveFiles) |
| 324 .expand((files) => files) | 324 .expand((files) => files) |
| 325 .toSet(); | 325 .toSet(); |
| 326 signatureBuilder.addInt(transitiveFiles.length); | 326 signatureBuilder.addInt(transitiveFiles.length); |
| 327 | 327 |
| 328 // Append API signatures of transitive files. | 328 // Append API signatures of transitive files. |
| 329 for (var file in transitiveFiles) { | 329 for (var file in transitiveFiles) { |
| 330 signatureBuilder.addString(file.uri.toString()); | 330 signatureBuilder.addString(file.uri.toString()); |
| 331 // TODO(scheglov): Stop using content hashes here, when Kernel stops | 331 // TODO(scheglov): Stop using content hashes here, when Kernel stops |
| 332 // copying methods of mixed-in classes, | 332 // copying methods of mixed-in classes. |
| 333 // https://github.com/dart-lang/sdk/issues/29881 |
| 333 if (hasMixinApplication) { | 334 if (hasMixinApplication) { |
| 334 signatureBuilder.addBytes(file.contentHash); | 335 signatureBuilder.addBytes(file.contentHash); |
| 335 } else { | 336 } else { |
| 336 signatureBuilder.addBytes(file.apiSignature); | 337 signatureBuilder.addBytes(file.apiSignature); |
| 337 } | 338 } |
| 338 } | 339 } |
| 339 | 340 |
| 340 // Append content hashes of the cycle files. | 341 // Append content hashes of the cycle files. |
| 341 for (var library in cycle.libraries) { | 342 for (var library in cycle.libraries) { |
| 342 signatureBuilder.addBytes(library.contentHash); | 343 signatureBuilder.addBytes(library.contentHash); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 | 400 |
| 400 _LibraryCycleResult(this.cycle, this.signature, this.kernelLibraries); | 401 _LibraryCycleResult(this.cycle, this.signature, this.kernelLibraries); |
| 401 } | 402 } |
| 402 | 403 |
| 403 @visibleForTesting | 404 @visibleForTesting |
| 404 class _TestView { | 405 class _TestView { |
| 405 /// The list of [LibraryCycle]s compiled for the last delta. | 406 /// The list of [LibraryCycle]s compiled for the last delta. |
| 406 /// It does not include libraries which were read from the cache. | 407 /// It does not include libraries which were read from the cache. |
| 407 final List<LibraryCycle> compiledCycles = []; | 408 final List<LibraryCycle> compiledCycles = []; |
| 408 } | 409 } |
| OLD | NEW |