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

Side by Side Diff: pkg/analyzer/lib/src/summary/resynthesize.dart

Issue 1559963002: Use List<String> for combinators in summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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) 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 summary_resynthesizer; 5 library summary_resynthesizer;
6 6
7 import 'package:analyzer/analyzer.dart'; 7 import 'package:analyzer/analyzer.dart';
8 import 'package:analyzer/src/generated/element.dart'; 8 import 'package:analyzer/src/generated/element.dart';
9 import 'package:analyzer/src/generated/element_handle.dart'; 9 import 'package:analyzer/src/generated/element_handle.dart';
10 import 'package:analyzer/src/generated/engine.dart'; 10 import 'package:analyzer/src/generated/engine.dart';
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 } 342 }
343 } 343 }
344 344
345 /** 345 /**
346 * Resynthesize a [NamespaceCombinator]. 346 * Resynthesize a [NamespaceCombinator].
347 */ 347 */
348 NamespaceCombinator buildCombinator(UnlinkedCombinator serializedCombinator) { 348 NamespaceCombinator buildCombinator(UnlinkedCombinator serializedCombinator) {
349 if (serializedCombinator.shows.isNotEmpty) { 349 if (serializedCombinator.shows.isNotEmpty) {
350 ShowElementCombinatorImpl combinator = new ShowElementCombinatorImpl(); 350 ShowElementCombinatorImpl combinator = new ShowElementCombinatorImpl();
351 combinator.shownNames = serializedCombinator.shows 351 combinator.shownNames = serializedCombinator.shows
352 .map((UnlinkedCombinatorName n) => n.name)
353 .toList(); 352 .toList();
scheglov 2016/01/04 17:21:50 AFAIK it is List already.
Paul Berry 2016/01/04 18:07:51 Right, it is. But I want to make a copy of the li
354 return combinator; 353 return combinator;
355 } else { 354 } else {
356 HideElementCombinatorImpl combinator = new HideElementCombinatorImpl(); 355 HideElementCombinatorImpl combinator = new HideElementCombinatorImpl();
357 combinator.hiddenNames = serializedCombinator.hides 356 combinator.hiddenNames = serializedCombinator.hides
358 .map((UnlinkedCombinatorName n) => n.name)
359 .toList(); 357 .toList();
360 return combinator; 358 return combinator;
361 } 359 }
362 } 360 }
363 361
364 /** 362 /**
365 * Resynthesize a [ConstructorElement] and place it in the given [holder]. 363 * Resynthesize a [ConstructorElement] and place it in the given [holder].
366 */ 364 */
367 void buildConstructor( 365 void buildConstructor(
368 UnlinkedExecutable serializedExecutable, ElementHolder holder) { 366 UnlinkedExecutable serializedExecutable, ElementHolder holder) {
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 } 962 }
965 for (FunctionTypeAliasElement typeAlias in unit.functionTypeAliases) { 963 for (FunctionTypeAliasElement typeAlias in unit.functionTypeAliases) {
966 elementMap[typeAlias.name] = typeAlias; 964 elementMap[typeAlias.name] = typeAlias;
967 } 965 }
968 resummarizedElements[absoluteUri] = elementMap; 966 resummarizedElements[absoluteUri] = elementMap;
969 unitHolder = null; 967 unitHolder = null;
970 prelinkedUnit = null; 968 prelinkedUnit = null;
971 unlinkedUnit = null; 969 unlinkedUnit = null;
972 } 970 }
973 } 971 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/public_namespace_computer.dart ('k') | pkg/analyzer/lib/src/summary/summarize_elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698