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

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

Issue 1699243003: Serialize and resynthesize unresolved constant instance creations. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Add more tests. Created 4 years, 10 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/resynthesize.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 'package:analyzer/src/summary/format.dart'; 5 import 'package:analyzer/src/summary/format.dart';
6 import 'package:analyzer/src/summary/idl.dart'; 6 import 'package:analyzer/src/summary/idl.dart';
7 import 'package:analyzer/src/summary/name_filter.dart'; 7 import 'package:analyzer/src/summary/name_filter.dart';
8 8
9 /** 9 /**
10 * Create a [LinkedLibraryBuilder] corresponding to the given 10 * Create a [LinkedLibraryBuilder] corresponding to the given
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 // then it must be the `String.length` property reference. 416 // then it must be the `String.length` property reference.
417 if (namespace == null && reference.name == 'length') { 417 if (namespace == null && reference.name == 'length') {
418 ReferenceKind prefixKind = references[reference.prefixReference].kind; 418 ReferenceKind prefixKind = references[reference.prefixReference].kind;
419 if (prefixKind == ReferenceKind.topLevelPropertyAccessor || 419 if (prefixKind == ReferenceKind.topLevelPropertyAccessor ||
420 prefixKind == ReferenceKind.propertyAccessor) { 420 prefixKind == ReferenceKind.propertyAccessor) {
421 references 421 references
422 .add(new LinkedReferenceBuilder(kind: ReferenceKind.length)); 422 .add(new LinkedReferenceBuilder(kind: ReferenceKind.length));
423 continue; 423 continue;
424 } 424 }
425 } 425 }
426 // Anything prefixed with 'unresolved' is unresolved.
427 if (references[reference.prefixReference].kind ==
428 ReferenceKind.unresolved) {
429 namespace = const <String, _Meaning>{};
430 }
426 // Prefix references must always point to proper prefixes. 431 // Prefix references must always point to proper prefixes.
427 assert(namespace != null); 432 assert(namespace != null);
428 } 433 }
429 _Meaning meaning = namespace[reference.name]; 434 _Meaning meaning = namespace[reference.name];
430 if (meaning != null) { 435 if (meaning != null) {
431 if (meaning is _PrefixMeaning) { 436 if (meaning is _PrefixMeaning) {
432 prefixNamespaces[i] = meaning.namespace; 437 prefixNamespaces[i] = meaning.namespace;
433 } else if (meaning is _ClassMeaning) { 438 } else if (meaning is _ClassMeaning) {
434 prefixNamespaces[i] = meaning.namespace; 439 prefixNamespaces[i] = meaning.namespace;
435 } 440 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 * [sourceUri] is also relative. 504 * [sourceUri] is also relative.
500 */ 505 */
501 String resolveUri(String sourceUri, String relativeUri) { 506 String resolveUri(String sourceUri, String relativeUri) {
502 if (sourceUri == null) { 507 if (sourceUri == null) {
503 return relativeUri; 508 return relativeUri;
504 } else { 509 } else {
505 return Uri.parse(sourceUri).resolve(relativeUri).toString(); 510 return Uri.parse(sourceUri).resolve(relativeUri).toString();
506 } 511 }
507 } 512 }
508 } 513 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/resynthesize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698