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

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

Issue 1621763002: Use the explicit string 'dynamic' to refer to dynamic 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 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/dart/element/type.dart'; 10 import 'package:analyzer/dart/element/type.dart';
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 name = referenceResolution.name; 980 name = referenceResolution.name;
981 } 981 }
982 ElementLocationImpl location; 982 ElementLocationImpl location;
983 if (referenceResolution.dependency != 0) { 983 if (referenceResolution.dependency != 0) {
984 location = getReferencedLocation( 984 location = getReferencedLocation(
985 linkedLibrary.dependencies[referenceResolution.dependency], 985 linkedLibrary.dependencies[referenceResolution.dependency],
986 referenceResolution.unit, 986 referenceResolution.unit,
987 name); 987 name);
988 } else if (referenceResolution.kind == ReferenceKind.unresolved) { 988 } else if (referenceResolution.kind == ReferenceKind.unresolved) {
989 return summaryResynthesizer.typeProvider.undefinedType; 989 return summaryResynthesizer.typeProvider.undefinedType;
990 } else if (name.isEmpty) { 990 } else if (name == 'dynamic') {
991 return summaryResynthesizer.typeProvider.dynamicType; 991 return summaryResynthesizer.typeProvider.dynamicType;
992 } else { 992 } else {
993 String referencedLibraryUri = librarySource.uri.toString(); 993 String referencedLibraryUri = librarySource.uri.toString();
994 String partUri; 994 String partUri;
995 if (referenceResolution.unit != 0) { 995 if (referenceResolution.unit != 0) {
996 String uri = unlinkedUnits[0].publicNamespace.parts[ 996 String uri = unlinkedUnits[0].publicNamespace.parts[
997 referenceResolution.unit - 1]; 997 referenceResolution.unit - 1];
998 Source partSource = 998 Source partSource =
999 summaryResynthesizer.sourceFactory.resolveUri(librarySource, uri); 999 summaryResynthesizer.sourceFactory.resolveUri(librarySource, uri);
1000 partUri = partSource.uri.toString(); 1000 partUri = partSource.uri.toString();
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 for (PropertyAccessorElementImpl accessor in unit.accessors) { 1207 for (PropertyAccessorElementImpl accessor in unit.accessors) {
1208 elementMap[accessor.identifier] = accessor; 1208 elementMap[accessor.identifier] = accessor;
1209 } 1209 }
1210 resummarizedElements[absoluteUri] = elementMap; 1210 resummarizedElements[absoluteUri] = elementMap;
1211 unitHolder = null; 1211 unitHolder = null;
1212 linkedUnit = null; 1212 linkedUnit = null;
1213 unlinkedUnit = null; 1213 unlinkedUnit = null;
1214 linkedTypeMap = null; 1214 linkedTypeMap = null;
1215 } 1215 }
1216 } 1216 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/prelink.dart ('k') | pkg/analyzer/lib/src/summary/summarize_ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698