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

Unified Diff: pkg/compiler/lib/src/elements/elements.dart

Issue 1132783002: Add Accessor, Getter, and Setter elements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/deferred_load.dart ('k') | pkg/compiler/lib/src/elements/modelx.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/elements.dart
diff --git a/pkg/compiler/lib/src/elements/elements.dart b/pkg/compiler/lib/src/elements/elements.dart
index baf0cbdb2224a55d30cae43e48fcd3e1e4de08a7..5301e0bcce1b25dbd8824ea876487d3a3bfba786 100644
--- a/pkg/compiler/lib/src/elements/elements.dart
+++ b/pkg/compiler/lib/src/elements/elements.dart
@@ -411,9 +411,6 @@ abstract class Element implements Entity {
bool get isAbstract;
bool isForeign(Backend backend);
- void addMetadata(MetadataAnnotation annotation);
- void setNative(String name);
-
Scope buildScope();
void diagnose(Element context, DiagnosticListener listener);
@@ -840,12 +837,14 @@ abstract class ScopeContainerElement implements Element {
}
abstract class CompilationUnitElement extends Element {
+ /// Use [library] instead.
+ @deprecated
+ get enclosingElement;
+
Script get script;
PartOf get partTag;
void forEachLocalMember(f(Element element));
- void addMember(Element element, DiagnosticListener listener);
- void setPartOf(PartOf tag, DiagnosticListener listener);
bool get hasMembers;
int compareTo(CompilationUnitElement other);
@@ -887,33 +886,15 @@ abstract class LibraryElement extends Element
* an underscore.
*/
bool get isInternalLibrary;
+
bool get canUseNative;
bool get exportsHandled;
- // TODO(kasperl): We should try to get rid of these.
- void set libraryTag(LibraryName value);
-
LibraryElement get implementation;
- void addCompilationUnit(CompilationUnitElement element);
- void addTag(LibraryTag tag, DiagnosticListener listener);
- void addImport(Element element, Import import, DiagnosticListener listener);
-
- /// Record which element an import or export tag resolved to.
- /// (Belongs on builder object).
- void recordResolvedTag(LibraryDependency tag, LibraryElement library);
-
/// Return the library element corresponding to an import or export.
LibraryElement getLibraryFromTag(LibraryDependency tag);
- void addMember(Element element, DiagnosticListener listener);
- void addToScope(Element element, DiagnosticListener listener);
-
- // TODO(kasperl): Get rid of this method.
- Iterable<Element> getNonPrivateElementsInScope();
-
- void setExports(Iterable<Element> exportedElements);
-
Element find(String elementName);
Element findLocal(String elementName);
Element findExported(String elementName);
@@ -1139,10 +1120,6 @@ abstract class FunctionElement extends Element
FunctionElement get patch;
FunctionElement get origin;
- /// Used to retrieve a link to the abstract field element representing this
- /// element.
- AbstractFieldElement get abstractField;
-
/// Do not use [computeSignature] outside of the resolver; instead retrieve
/// the signature through the [functionSignature] field.
/// Trying to access a function signature that has not been computed in
@@ -1166,6 +1143,25 @@ abstract class FunctionElement extends Element
bool get isExternal;
}
+/// A getter or setter.
+abstract class AccessorElement extends MethodElement {
+ /// Used to retrieve a link to the abstract field element representing this
+ /// element.
+ AbstractFieldElement get abstractField;
+}
+
+/// A getter.
+abstract class GetterElement extends AccessorElement {
+ /// The setter corresponding to this getter, if any.
+ SetterElement get setter;
+}
+
+/// A setter.
+abstract class SetterElement extends AccessorElement {
+ /// The getter corresponding to this setter, if any.
+ GetterElement get getter;
+}
+
/// Enum for the synchronous/asynchronous function body modifiers.
class AsyncMarker {
/// The default function body marker.
« no previous file with comments | « pkg/compiler/lib/src/deferred_load.dart ('k') | pkg/compiler/lib/src/elements/modelx.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698