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

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

Issue 1636113002: Serialize static constant field references. (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 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 return new ClassElementHandle(summaryResynthesizer, location); 638 return new ClassElementHandle(summaryResynthesizer, location);
639 case ReferenceKind.typedef: 639 case ReferenceKind.typedef:
640 return new FunctionTypeAliasElementHandle( 640 return new FunctionTypeAliasElementHandle(
641 summaryResynthesizer, location); 641 summaryResynthesizer, location);
642 case ReferenceKind.topLevelFunction: 642 case ReferenceKind.topLevelFunction:
643 return new FunctionElementHandle(summaryResynthesizer, location); 643 return new FunctionElementHandle(summaryResynthesizer, location);
644 case ReferenceKind.topLevelPropertyAccessor: 644 case ReferenceKind.topLevelPropertyAccessor:
645 return new PropertyAccessorElementHandle( 645 return new PropertyAccessorElementHandle(
646 summaryResynthesizer, location); 646 summaryResynthesizer, location);
647 case ReferenceKind.constructor: 647 case ReferenceKind.constructor:
648 case ReferenceKind.constField:
648 case ReferenceKind.staticMethod: 649 case ReferenceKind.staticMethod:
649 case ReferenceKind.prefix: 650 case ReferenceKind.prefix:
650 case ReferenceKind.unresolved: 651 case ReferenceKind.unresolved:
651 // Should never happen. Exported names never refer to import prefixes, 652 // Should never happen. Exported names never refer to import prefixes,
652 // and they always refer to defined top-level entities. 653 // and they always refer to defined top-level entities.
653 throw new StateError('Unexpected export name kind: ${exportName.kind}'); 654 throw new StateError('Unexpected export name kind: ${exportName.kind}');
654 } 655 }
655 } 656 }
656 657
657 /** 658 /**
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 for (PropertyAccessorElementImpl accessor in unit.accessors) { 1226 for (PropertyAccessorElementImpl accessor in unit.accessors) {
1226 elementMap[accessor.identifier] = accessor; 1227 elementMap[accessor.identifier] = accessor;
1227 } 1228 }
1228 resummarizedElements[absoluteUri] = elementMap; 1229 resummarizedElements[absoluteUri] = elementMap;
1229 unitHolder = null; 1230 unitHolder = null;
1230 linkedUnit = null; 1231 linkedUnit = null;
1231 unlinkedUnit = null; 1232 unlinkedUnit = null;
1232 linkedTypeMap = null; 1233 linkedTypeMap = null;
1233 } 1234 }
1234 } 1235 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698