| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library test.src.serialization.elements_test; | 5 library test.src.serialization.elements_test; |
| 6 | 6 |
| 7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; | 8 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; |
| 9 import 'package:analyzer/dart/constant/value.dart'; | 9 import 'package:analyzer/dart/constant/value.dart'; |
| 10 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
| (...skipping 4893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4904 * [getUnlinkedSummary]. | 4904 * [getUnlinkedSummary]. |
| 4905 */ | 4905 */ |
| 4906 final Set<String> unlinkedSummariesRequested = new Set<String>(); | 4906 final Set<String> unlinkedSummariesRequested = new Set<String>(); |
| 4907 | 4907 |
| 4908 /** | 4908 /** |
| 4909 * The set of uris for which linked summaries have been requested using | 4909 * The set of uris for which linked summaries have been requested using |
| 4910 * [getLinkedSummary]. | 4910 * [getLinkedSummary]. |
| 4911 */ | 4911 */ |
| 4912 final Set<String> linkedSummariesRequested = new Set<String>(); | 4912 final Set<String> linkedSummariesRequested = new Set<String>(); |
| 4913 | 4913 |
| 4914 TestSummaryResynthesizer(SummaryResynthesizer parent, AnalysisContext context, | 4914 TestSummaryResynthesizer(AnalysisContext context, this.unlinkedSummaries, |
| 4915 this.unlinkedSummaries, this.linkedSummaries, this.allowMissingFiles) | 4915 this.linkedSummaries, this.allowMissingFiles) |
| 4916 : super(parent, context, context.sourceFactory, | 4916 : super(context, context.sourceFactory, |
| 4917 context.analysisOptions.strongMode) { | 4917 context.analysisOptions.strongMode) { |
| 4918 // Clear after resynthesizing TypeProvider in super(). | 4918 // Clear after resynthesizing TypeProvider in super(). |
| 4919 unlinkedSummariesRequested.clear(); | 4919 unlinkedSummariesRequested.clear(); |
| 4920 linkedSummariesRequested.clear(); | 4920 linkedSummariesRequested.clear(); |
| 4921 } | 4921 } |
| 4922 | 4922 |
| 4923 @override | 4923 @override |
| 4924 LinkedLibrary getLinkedSummary(String uri) { | 4924 LinkedLibrary getLinkedSummary(String uri) { |
| 4925 linkedSummariesRequested.add(uri); | 4925 linkedSummariesRequested.add(uri); |
| 4926 LinkedLibrary serializedLibrary = linkedSummaries[uri]; | 4926 LinkedLibrary serializedLibrary = linkedSummaries[uri]; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 4938 fail('Unexpectedly tried to get unlinked summary for $uri'); | 4938 fail('Unexpectedly tried to get unlinked summary for $uri'); |
| 4939 } | 4939 } |
| 4940 return serializedUnit; | 4940 return serializedUnit; |
| 4941 } | 4941 } |
| 4942 | 4942 |
| 4943 @override | 4943 @override |
| 4944 bool hasLibrarySummary(String uri) { | 4944 bool hasLibrarySummary(String uri) { |
| 4945 return true; | 4945 return true; |
| 4946 } | 4946 } |
| 4947 } | 4947 } |
| OLD | NEW |