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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart

Issue 561233005: Add ElementX.declarationSite. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r40311. Created 6 years, 3 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 | « no previous file | dart/sdk/lib/_internal/compiler/implementation/scanner/listener.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart b/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
index 48cdc49f534bd79f1010e81be937d8bc7bcf0ab3..7cca0628c4a402565b1304944de8e616dc469549 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
@@ -38,6 +38,9 @@ import '../ordered_typeset.dart' show OrderedTypeSet;
import 'visitor.dart' show ElementVisitor;
+abstract class DeclarationSite {
+}
+
abstract class ElementX extends Element {
static int elementHashCode = 0;
@@ -261,6 +264,8 @@ abstract class ElementX extends Element {
if (element.isAbstractField || element.isPrefix) return element.library;
return element;
}
+
+ DeclarationSite get declarationSite => null;
}
class ErroneousElementX extends ElementX implements ErroneousElement {
@@ -1080,7 +1085,7 @@ class TypedefElementX extends ElementX
// This class holds common information for a list of variable or field
// declarations. It contains the node, and the type. A [VariableElementX]
// forwards its [computeType] and [parseNode] methods to this class.
-class VariableList {
+class VariableList implements DeclarationSite {
VariableDefinitions definitions;
DartType type;
final Modifiers modifiers;
@@ -1209,6 +1214,8 @@ abstract class VariableElementX extends ElementX with AstElementMixin
Token get position => token;
accept(ElementVisitor visitor) => visitor.visitVariableElement(this);
+
+ DeclarationSite get declarationSite => variables;
}
class LocalVariableElementX extends VariableElementX
« no previous file with comments | « no previous file | dart/sdk/lib/_internal/compiler/implementation/scanner/listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698