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

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

Issue 1192103002: Support serialization of the compiler backbone. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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; 5 library elements;
6 6
7 7
8 import '../constants/expressions.dart'; 8 import '../constants/expressions.dart';
9 import '../tree/tree.dart'; 9 import '../tree/tree.dart';
10 import '../util/util.dart'; 10 import '../util/util.dart';
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 /// 388 ///
389 /// See [:patch_parser.dart:] for a description of the terminology. 389 /// See [:patch_parser.dart:] for a description of the terminology.
390 Element get patch; 390 Element get patch;
391 391
392 /// Returns the origin for this element if this element is a patch. 392 /// Returns the origin for this element if this element is a patch.
393 /// 393 ///
394 /// See [:patch_parser.dart:] for a description of the terminology. 394 /// See [:patch_parser.dart:] for a description of the terminology.
395 Element get origin; 395 Element get origin;
396 396
397 bool get isSynthesized; 397 bool get isSynthesized;
398 //bool get isResolved;
floitsch 2015/06/26 20:54:04 remove.
Johnni Winther 2015/07/03 12:13:44 Done.
398 bool get isMixinApplication; 399 bool get isMixinApplication;
399 400
400 bool get hasFixedBackendName; 401 bool get hasFixedBackendName;
401 String get fixedBackendName; 402 String get fixedBackendName;
402 403
403 bool get isAbstract; 404 bool get isAbstract;
404 405
405 Scope buildScope(); 406 Scope buildScope();
406 407
407 void diagnose(Element context, DiagnosticListener listener); 408 void diagnose(Element context, DiagnosticListener listener);
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 830
830 void forEachLocalMember(f(Element element)); 831 void forEachLocalMember(f(Element element));
831 } 832 }
832 833
833 abstract class CompilationUnitElement extends Element { 834 abstract class CompilationUnitElement extends Element {
834 /// Use [library] instead. 835 /// Use [library] instead.
835 @deprecated 836 @deprecated
836 get enclosingElement; 837 get enclosingElement;
837 838
838 Script get script; 839 Script get script;
839 PartOf get partTag;
840 840
841 void forEachLocalMember(f(Element element)); 841 void forEachLocalMember(f(Element element));
842 bool get hasMembers;
843 842
844 int compareTo(CompilationUnitElement other); 843 int compareTo(CompilationUnitElement other);
845 } 844 }
846 845
847 abstract class LibraryElement extends Element 846 abstract class LibraryElement extends Element
848 implements ScopeContainerElement, AnalyzableElement { 847 implements ScopeContainerElement, AnalyzableElement {
849 /** 848 /**
850 * The canonical uri for this library. 849 * The canonical uri for this library.
851 * 850 *
852 * For user libraries the canonical uri is the script uri. For platform 851 * For user libraries the canonical uri is the script uri. For platform
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 void forEachExport(f(Element element)); 894 void forEachExport(f(Element element));
896 895
897 /// Calls [f] for each [Element] imported into this library. 896 /// Calls [f] for each [Element] imported into this library.
898 void forEachImport(f(Element element)); 897 void forEachImport(f(Element element));
899 898
900 /// Returns the imports that import element into this library. 899 /// Returns the imports that import element into this library.
901 Link<Import> getImportsFor(Element element); 900 Link<Import> getImportsFor(Element element);
902 901
903 bool hasLibraryName(); 902 bool hasLibraryName();
904 String getLibraryName(); 903 String getLibraryName();
904
905 /**
906 * Returns the library name (as defined by the library tag) or for script
907 * (which have no library tag) the script file name. The latter case is used
908 * to private 'library name' for scripts to use for instance in dartdoc.
floitsch 2015/06/26 20:54:04 sentence isn't English.
Johnni Winther 2015/07/03 12:13:44 Done.
909 *
910 * Note: the returned filename will still be escaped ("a%20b.dart" instead of
floitsch 2015/06/26 20:54:04 is still escaped.
Johnni Winther 2015/07/03 12:13:44 Done.
911 * "a b.dart").
912 */
905 String getLibraryOrScriptName(); 913 String getLibraryOrScriptName();
906 914
907 int compareTo(LibraryElement other); 915 int compareTo(LibraryElement other);
908 } 916 }
909 917
910 /// The implicit scope defined by a import declaration with a prefix clause. 918 /// The implicit scope defined by a import declaration with a prefix clause.
911 abstract class PrefixElement extends Element { 919 abstract class PrefixElement extends Element {
912 void addImport(Element element, Import import, DiagnosticListener listener); 920 void addImport(Element element, Import import, DiagnosticListener listener);
913 Element lookupLocalMember(String memberName); 921 Element lookupLocalMember(String memberName);
914 /// Is true if this prefix belongs to a deferred import. 922 /// Is true if this prefix belongs to a deferred import.
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
1483 abstract class TypeVariableElement extends Element 1491 abstract class TypeVariableElement extends Element
1484 implements AstElement, TypedElement { 1492 implements AstElement, TypedElement {
1485 1493
1486 /// Use [typeDeclaration] instead. 1494 /// Use [typeDeclaration] instead.
1487 @deprecated 1495 @deprecated
1488 get enclosingElement; 1496 get enclosingElement;
1489 1497
1490 /// The class or typedef on which this type variable is defined. 1498 /// The class or typedef on which this type variable is defined.
1491 TypeDeclarationElement get typeDeclaration; 1499 TypeDeclarationElement get typeDeclaration;
1492 1500
1501 /// The index of this type variable within its type declaraiton.
1502 int get index;
1503
1493 /// The [type] defined by the type variable. 1504 /// The [type] defined by the type variable.
1494 TypeVariableType get type; 1505 TypeVariableType get type;
1495 1506
1496 /// The upper bound on the type variable. If not explicitly declared, this is 1507 /// The upper bound on the type variable. If not explicitly declared, this is
1497 /// `Object`. 1508 /// `Object`.
1498 DartType get bound; 1509 DartType get bound;
1499 } 1510 }
1500 1511
1501 abstract class MetadataAnnotation implements Spannable { 1512 abstract class MetadataAnnotation implements Spannable {
1502 /// The front-end constant of this metadata annotation. 1513 /// The front-end constant of this metadata annotation.
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1643 bool get isDeclaredByField; 1654 bool get isDeclaredByField;
1644 1655
1645 /// Returns `true` if this member is abstract. 1656 /// Returns `true` if this member is abstract.
1646 bool get isAbstract; 1657 bool get isAbstract;
1647 1658
1648 /// If abstract, [implementation] points to the overridden concrete member, 1659 /// If abstract, [implementation] points to the overridden concrete member,
1649 /// if any. Otherwise [implementation] points to the member itself. 1660 /// if any. Otherwise [implementation] points to the member itself.
1650 Member get implementation; 1661 Member get implementation;
1651 } 1662 }
1652 1663
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698