| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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:convert'; | 5 import 'dart:convert'; |
| 6 import 'dart:typed_data'; | 6 import 'dart:typed_data'; |
| 7 | 7 |
| 8 import 'package:analyzer/dart/ast/ast.dart'; | 8 import 'package:analyzer/dart/ast/ast.dart'; |
| 9 import 'package:analyzer/dart/ast/token.dart'; | 9 import 'package:analyzer/dart/ast/token.dart'; |
| 10 import 'package:analyzer/error/listener.dart'; | 10 import 'package:analyzer/error/listener.dart'; |
| 11 import 'package:analyzer/file_system/file_system.dart'; | 11 import 'package:analyzer/file_system/file_system.dart'; |
| 12 import 'package:analyzer/src/dart/analysis/byte_store.dart'; | 12 import 'package:analyzer/src/dart/analysis/byte_store.dart'; |
| 13 import 'package:analyzer/src/dart/analysis/driver.dart'; | 13 import 'package:analyzer/src/dart/analysis/driver.dart'; |
| 14 import 'package:analyzer/src/dart/analysis/referenced_names.dart'; | 14 import 'package:analyzer/src/dart/analysis/referenced_names.dart'; |
| 15 import 'package:analyzer/src/dart/analysis/top_level_declaration.dart'; | 15 import 'package:analyzer/src/dart/analysis/top_level_declaration.dart'; |
| 16 import 'package:analyzer/src/dart/scanner/reader.dart'; | 16 import 'package:analyzer/src/dart/scanner/reader.dart'; |
| 17 import 'package:analyzer/src/dart/scanner/scanner.dart'; | 17 import 'package:analyzer/src/dart/scanner/scanner.dart'; |
| 18 import 'package:analyzer/src/generated/engine.dart'; | 18 import 'package:analyzer/src/generated/engine.dart'; |
| 19 import 'package:analyzer/src/generated/parser.dart'; | 19 import 'package:analyzer/src/generated/parser.dart'; |
| 20 import 'package:analyzer/src/generated/source.dart'; | 20 import 'package:analyzer/src/generated/source.dart'; |
| 21 import 'package:analyzer/src/generated/utilities_dart.dart'; | 21 import 'package:analyzer/src/generated/utilities_dart.dart'; |
| 22 import 'package:analyzer/src/source/source_resource.dart'; | 22 import 'package:analyzer/src/source/source_resource.dart'; |
| 23 import 'package:analyzer/src/summary/api_signature.dart'; | 23 import 'package:analyzer/src/summary/api_signature.dart'; |
| 24 import 'package:analyzer/src/summary/format.dart'; | 24 import 'package:analyzer/src/summary/format.dart'; |
| 25 import 'package:analyzer/src/summary/idl.dart'; | 25 import 'package:analyzer/src/summary/idl.dart'; |
| 26 import 'package:analyzer/src/summary/name_filter.dart'; | 26 import 'package:analyzer/src/summary/name_filter.dart'; |
| 27 import 'package:analyzer/src/summary/summarize_ast.dart'; | 27 import 'package:analyzer/src/summary/summarize_ast.dart'; |
| 28 import 'package:analyzer/src/util/fast_uri.dart'; | |
| 29 import 'package:convert/convert.dart'; | 28 import 'package:convert/convert.dart'; |
| 30 import 'package:crypto/crypto.dart'; | 29 import 'package:crypto/crypto.dart'; |
| 31 import 'package:meta/meta.dart'; | 30 import 'package:meta/meta.dart'; |
| 32 | 31 |
| 33 /** | 32 /** |
| 34 * [FileContentOverlay] is used to temporary override content of files. | 33 * [FileContentOverlay] is used to temporary override content of files. |
| 35 */ | 34 */ |
| 36 class FileContentOverlay { | 35 class FileContentOverlay { |
| 37 final _map = <String, String>{}; | 36 final _map = <String, String>{}; |
| 38 | 37 |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 return apiSignatureChanged; | 484 return apiSignatureChanged; |
| 486 } | 485 } |
| 487 | 486 |
| 488 @override | 487 @override |
| 489 String toString() => path; | 488 String toString() => path; |
| 490 | 489 |
| 491 /** | 490 /** |
| 492 * Return the [FileState] for the given [relativeUri]. | 491 * Return the [FileState] for the given [relativeUri]. |
| 493 */ | 492 */ |
| 494 FileState _fileForRelativeUri(String relativeUri) { | 493 FileState _fileForRelativeUri(String relativeUri) { |
| 495 Uri absoluteUri = resolveRelativeUri(uri, FastUri.parse(relativeUri)); | 494 Uri absoluteUri = resolveRelativeUri(uri, Uri.parse(relativeUri)); |
| 496 return _fsState.getFileForUri(absoluteUri); | 495 return _fsState.getFileForUri(absoluteUri); |
| 497 } | 496 } |
| 498 | 497 |
| 499 /** | 498 /** |
| 500 * Return `true` if the given byte lists are equal. | 499 * Return `true` if the given byte lists are equal. |
| 501 */ | 500 */ |
| 502 static bool _equalByteLists(List<int> a, List<int> b) { | 501 static bool _equalByteLists(List<int> a, List<int> b) { |
| 503 if (a == null) { | 502 if (a == null) { |
| 504 return b == null; | 503 return b == null; |
| 505 } else if (b == null) { | 504 } else if (b == null) { |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 .where((f) => f._transitiveFiles == null) | 704 .where((f) => f._transitiveFiles == null) |
| 706 .toSet(); | 705 .toSet(); |
| 707 } | 706 } |
| 708 | 707 |
| 709 Set<FileState> get filesWithoutTransitiveSignature { | 708 Set<FileState> get filesWithoutTransitiveSignature { |
| 710 return state._uriToFile.values | 709 return state._uriToFile.values |
| 711 .where((f) => f._transitiveSignature == null) | 710 .where((f) => f._transitiveSignature == null) |
| 712 .toSet(); | 711 .toSet(); |
| 713 } | 712 } |
| 714 } | 713 } |
| OLD | NEW |