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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/elements/elements.dart

Issue 90713003: Dart2js option to dump info about compilation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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
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 '../tree/tree.dart'; 8 import '../tree/tree.dart';
9 import '../util/util.dart'; 9 import '../util/util.dart';
10 import '../resolution/resolution.dart'; 10 import '../resolution/resolution.dart';
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 } 620 }
621 621
622 // TODO(kasperl): This probably shouldn't be called an element. It's 622 // TODO(kasperl): This probably shouldn't be called an element. It's
623 // just an interface shared by classes and libraries. 623 // just an interface shared by classes and libraries.
624 abstract class ScopeContainerElement implements Element { 624 abstract class ScopeContainerElement implements Element {
625 Element localLookup(String elementName); 625 Element localLookup(String elementName);
626 626
627 void forEachLocalMember(f(Element element)); 627 void forEachLocalMember(f(Element element));
628 } 628 }
629 629
630 abstract class ClosureContainer implements Element {
631 List<FunctionElement> get nestedClosures;
632 }
633
630 abstract class CompilationUnitElement extends Element { 634 abstract class CompilationUnitElement extends Element {
631 Script get script; 635 Script get script;
632 PartOf get partTag; 636 PartOf get partTag;
633 637
634 void forEachLocalMember(f(Element element)); 638 void forEachLocalMember(f(Element element));
635 void addMember(Element element, DiagnosticListener listener); 639 void addMember(Element element, DiagnosticListener listener);
636 void setPartOf(PartOf tag, DiagnosticListener listener); 640 void setPartOf(PartOf tag, DiagnosticListener listener);
637 bool get hasMembers; 641 bool get hasMembers;
638 642
639 int compareTo(CompilationUnitElement other); 643 int compareTo(CompilationUnitElement other);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 void checkCyclicReference(Compiler compiler); 736 void checkCyclicReference(Compiler compiler);
733 } 737 }
734 738
735 abstract class VariableElement extends Element { 739 abstract class VariableElement extends Element {
736 VariableListElement get variables; 740 VariableListElement get variables;
737 741
738 // TODO(kasperl): Try to get rid of this. 742 // TODO(kasperl): Try to get rid of this.
739 Expression get cachedNode; 743 Expression get cachedNode;
740 } 744 }
741 745
746 abstract class FieldElement extends VariableElement
747 implements ClosureContainer {}
748
742 abstract class FieldParameterElement extends VariableElement { 749 abstract class FieldParameterElement extends VariableElement {
743 VariableElement get fieldElement; 750 VariableElement get fieldElement;
744 } 751 }
745 752
746 abstract class VariableListElement extends Element { 753 abstract class VariableListElement extends Element {
747 DartType get type; 754 DartType get type;
748 FunctionSignature get functionSignature; 755 FunctionSignature get functionSignature;
749 756
750 // TODO(kasperl): Try to get rid of this. 757 // TODO(kasperl): Try to get rid of this.
751 void set type(DartType value); 758 void set type(DartType value);
(...skipping 26 matching lines...) Expand all
778 785
779 void forEachParameter(void function(Element parameter)); 786 void forEachParameter(void function(Element parameter));
780 void forEachRequiredParameter(void function(Element parameter)); 787 void forEachRequiredParameter(void function(Element parameter));
781 void forEachOptionalParameter(void function(Element parameter)); 788 void forEachOptionalParameter(void function(Element parameter));
782 789
783 void orderedForEachParameter(void function(Element parameter)); 790 void orderedForEachParameter(void function(Element parameter));
784 791
785 bool isCompatibleWith(FunctionSignature constructorSignature); 792 bool isCompatibleWith(FunctionSignature constructorSignature);
786 } 793 }
787 794
788 abstract class FunctionElement extends Element { 795 abstract class FunctionElement extends Element implements ClosureContainer {
789 FunctionExpression get cachedNode; 796 FunctionExpression get cachedNode;
790 DartType get type; 797 DartType get type;
791 FunctionSignature get functionSignature; 798 FunctionSignature get functionSignature;
792 FunctionElement get redirectionTarget; 799 FunctionElement get redirectionTarget;
793 FunctionElement get defaultImplementation; 800 FunctionElement get defaultImplementation;
794 801
795 FunctionElement get patch; 802 FunctionElement get patch;
796 FunctionElement get origin; 803 FunctionElement get origin;
797 804
798 bool get isRedirectingFactory; 805 bool get isRedirectingFactory;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 Element validateConstructorLookupResults(Selector selector, 918 Element validateConstructorLookupResults(Selector selector,
912 Element result, 919 Element result,
913 Element noMatch(Element)); 920 Element noMatch(Element));
914 921
915 Element lookupConstructor(Selector selector, [Element noMatch(Element)]); 922 Element lookupConstructor(Selector selector, [Element noMatch(Element)]);
916 923
917 void forEachMember(void f(ClassElement enclosingClass, Element member), 924 void forEachMember(void f(ClassElement enclosingClass, Element member),
918 {bool includeBackendMembers: false, 925 {bool includeBackendMembers: false,
919 bool includeSuperAndInjectedMembers: false}); 926 bool includeSuperAndInjectedMembers: false});
920 927
921 void forEachInstanceField(void f(ClassElement enclosingClass, Element field), 928 void forEachInstanceField(void f(ClassElement enclosingClass,
929 FieldElement field),
922 {bool includeSuperAndInjectedMembers: false}); 930 {bool includeSuperAndInjectedMembers: false});
923 931
924 /// Similar to [forEachInstanceField] but visits static fields. 932 /// Similar to [forEachInstanceField] but visits static fields.
925 void forEachStaticField(void f(ClassElement enclosingClass, Element field)); 933 void forEachStaticField(void f(ClassElement enclosingClass, Element field));
926 934
927 void forEachBackendMember(void f(Element member)); 935 void forEachBackendMember(void f(Element member));
928 936
929 Link<DartType> computeTypeParameters(Compiler compiler); 937 Link<DartType> computeTypeParameters(Compiler compiler);
930 } 938 }
931 939
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 Token get endToken; 991 Token get endToken;
984 992
985 // TODO(kasperl): Try to get rid of these. 993 // TODO(kasperl): Try to get rid of these.
986 void set annotatedElement(Element value); 994 void set annotatedElement(Element value);
987 void set resolutionState(int value); 995 void set resolutionState(int value);
988 996
989 MetadataAnnotation ensureResolved(Compiler compiler); 997 MetadataAnnotation ensureResolved(Compiler compiler);
990 } 998 }
991 999
992 abstract class VoidElement extends Element {} 1000 abstract class VoidElement extends Element {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698