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

Side by Side Diff: dart/pkg/compiler/lib/src/elements/modelx.dart

Issue 841653004: Recover from read errors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r42871 Created 5 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 | Annotate | Revision Log
« no previous file with comments | « dart/pkg/compiler/lib/src/compiler.dart ('k') | dart/pkg/compiler/lib/src/library_loader.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 elements.modelx; 5 library elements.modelx;
6 6
7 import 'elements.dart'; 7 import 'elements.dart';
8 import '../constants/expressions.dart'; 8 import '../constants/expressions.dart';
9 import '../helpers/helpers.dart'; // Included for debug helpers. 9 import '../helpers/helpers.dart'; // Included for debug helpers.
10 import '../tree/tree.dart'; 10 import '../tree/tree.dart';
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 } 749 }
750 } 750 }
751 751
752 Element operator [](String name) => importScope[name]; 752 Element operator [](String name) => importScope[name];
753 } 753 }
754 754
755 class LibraryElementX 755 class LibraryElementX
756 extends ElementX with AnalyzableElementX, PatchMixin<LibraryElementX> 756 extends ElementX with AnalyzableElementX, PatchMixin<LibraryElementX>
757 implements LibraryElement { 757 implements LibraryElement {
758 final Uri canonicalUri; 758 final Uri canonicalUri;
759
760 /// True if the constructing script was synthesized.
761 final bool isSynthesized;
762
759 CompilationUnitElement entryCompilationUnit; 763 CompilationUnitElement entryCompilationUnit;
760 Link<CompilationUnitElement> compilationUnits = 764 Link<CompilationUnitElement> compilationUnits =
761 const Link<CompilationUnitElement>(); 765 const Link<CompilationUnitElement>();
762 LinkBuilder<LibraryTag> tagsBuilder = new LinkBuilder<LibraryTag>(); 766 LinkBuilder<LibraryTag> tagsBuilder = new LinkBuilder<LibraryTag>();
763 List<LibraryTag> tagsCache; 767 List<LibraryTag> tagsCache;
764 LibraryName libraryTag; 768 LibraryName libraryTag;
765 bool canUseNative = false; 769 bool canUseNative = false;
766 Link<Element> localMembers = const Link<Element>(); 770 Link<Element> localMembers = const Link<Element>();
767 final ScopeX localScope = new ScopeX(); 771 final ScopeX localScope = new ScopeX();
768 final ImportScope importScope = new ImportScope(); 772 final ImportScope importScope = new ImportScope();
(...skipping 11 matching lines...) Expand all
780 */ 784 */
781 Link<Element> slotForExports; 785 Link<Element> slotForExports;
782 786
783 final Map<LibraryDependency, LibraryElement> tagMapping = 787 final Map<LibraryDependency, LibraryElement> tagMapping =
784 new Map<LibraryDependency, LibraryElement>(); 788 new Map<LibraryDependency, LibraryElement>();
785 789
786 LibraryElementX(Script script, 790 LibraryElementX(Script script,
787 [Uri canonicalUri, LibraryElementX origin]) 791 [Uri canonicalUri, LibraryElementX origin])
788 : this.canonicalUri = 792 : this.canonicalUri =
789 ((canonicalUri == null) ? script.readableUri : canonicalUri), 793 ((canonicalUri == null) ? script.readableUri : canonicalUri),
794 this.isSynthesized = script.isSynthesized,
790 super(script.name, ElementKind.LIBRARY, null) { 795 super(script.name, ElementKind.LIBRARY, null) {
791 entryCompilationUnit = new CompilationUnitElementX(script, this); 796 entryCompilationUnit = new CompilationUnitElementX(script, this);
792 if (origin != null) { 797 if (origin != null) {
793 origin.applyPatch(this); 798 origin.applyPatch(this);
794 } 799 }
795 } 800 }
796 801
797 bool get isDartCore => canonicalUri == Compiler.DART_CORE; 802 bool get isDartCore => canonicalUri == Compiler.DART_CORE;
798 803
799 Link<MetadataAnnotation> get metadata { 804 Link<MetadataAnnotation> get metadata {
(...skipping 2163 matching lines...) Expand 10 before | Expand all | Expand 10 after
2963 AstElement get definingElement; 2968 AstElement get definingElement;
2964 2969
2965 bool get hasResolvedAst => definingElement.hasTreeElements; 2970 bool get hasResolvedAst => definingElement.hasTreeElements;
2966 2971
2967 ResolvedAst get resolvedAst { 2972 ResolvedAst get resolvedAst {
2968 return new ResolvedAst(declaration, 2973 return new ResolvedAst(declaration,
2969 definingElement.node, definingElement.treeElements); 2974 definingElement.node, definingElement.treeElements);
2970 } 2975 }
2971 2976
2972 } 2977 }
OLDNEW
« no previous file with comments | « dart/pkg/compiler/lib/src/compiler.dart ('k') | dart/pkg/compiler/lib/src/library_loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698