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

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

Issue 548253003: First end-to-end capability in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. 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
Index: sdk/lib/_internal/compiler/implementation/elements/modelx.dart
diff --git a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
index 03dc477e5e047559339082a5c3da0213f2698cbf..06d80141872b40a19b0dcd1ea2e639322f4b5426 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
@@ -269,6 +269,8 @@ class ErroneousElementX extends ElementX implements ErroneousElement {
String name, Element enclosing)
: super(name, ElementKind.ERROR, enclosing);
+ bool get isTopLevel => false;
+
bool get isSynthesized => true;
AbstractFieldElement abstractField;
@@ -426,6 +428,8 @@ class AmbiguousElementX extends ElementX implements AmbiguousElement {
}
accept(ElementVisitor visitor) => visitor.visitAmbiguousElement(this);
+
+ bool get isTopLevel => false;
}
class ScopeX {
@@ -736,6 +740,8 @@ class LibraryElementX
}
}
+ bool get isDartCore => canonicalUri == Compiler.DART_CORE;
+
Link<MetadataAnnotation> get metadata {
return (libraryTag == null) ? super.metadata : libraryTag.metadata;
}
@@ -977,6 +983,8 @@ class PrefixElementX extends ElementX implements PrefixElement {
PrefixElementX(String prefix, Element enclosing, this.firstPosition)
: super(prefix, ElementKind.PREFIX, enclosing);
+ bool get isTopLevel => false;
+
Element lookupLocalMember(String memberName) => importScope[memberName];
DartType computeType(Compiler compiler) => const DynamicType();
@@ -1698,6 +1706,7 @@ class DeferredLoaderGetterElementX extends FunctionElementX {
bool get isGetter => true;
+ bool get isTopLevel => true;
// By having position null, the enclosing elements location is printed in
// error messages.
Token get position => null;

Powered by Google App Engine
This is Rietveld 408576698