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

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

Issue 2464103002: Introduce ClassLike, MemberLike, FieldLike and FunctionLike (Closed)
Patch Set: Updated cf. comments. Created 4 years, 1 month 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 | pkg/compiler/lib/src/elements/entities.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 e854e4d17c07de57c311944412d782f0acef2206..06b58d98fff5847156d639a9b34e5fc38f129539 100644
--- a/pkg/compiler/lib/src/elements/elements.dart
+++ b/pkg/compiler/lib/src/elements/elements.dart
@@ -20,6 +20,7 @@ import '../tokens/token.dart'
import '../tree/tree.dart';
import '../util/characters.dart' show $_;
import '../util/util.dart';
+import 'entities.dart';
import 'visitor.dart' show ElementVisitor;
part 'names.dart';
@@ -1047,7 +1048,8 @@ abstract class ExecutableElement extends Element
///
/// A [MemberElement] is the outermost executable element for any executable
/// context.
-abstract class MemberElement extends Element implements ExecutableElement {
+abstract class MemberElement extends Element
+ implements ExecutableElement, MemberEntity {
/// The local functions defined within this member.
List<FunctionElement> get nestedClosures;
@@ -1087,6 +1089,8 @@ abstract class VariableElement extends ExecutableElement {
/// factories and constructors it is not itself a [Local] but instead
/// a non-element [Local] is created through a specialized class.
// TODO(johnniwinther): Should [Local] have `isAssignable` or `type`?
+// TODO(johnniwinther): Move this to 'entities.dart' when it does not refer
+// to [ExecutableElement].
abstract class Local extends Entity {
/// The context in which this local is defined.
ExecutableElement get executableContext;
@@ -1100,7 +1104,8 @@ abstract class LocalVariableElement extends VariableElement
implements LocalElement {}
/// A top-level, static or instance field.
-abstract class FieldElement extends VariableElement implements MemberElement {}
+abstract class FieldElement extends VariableElement
+ implements MemberElement, FieldEntity {}
/// A parameter-like element of a function signature.
///
@@ -1291,15 +1296,15 @@ class AsyncMarker {
}
/// A top level, static or instance function.
-abstract class MethodElement extends FunctionElement implements MemberElement {}
+abstract class MethodElement extends FunctionElement
+ implements MemberElement, FunctionEntity {}
/// A local function or closure (anonymous local function).
abstract class LocalFunctionElement extends FunctionElement
implements LocalElement {}
/// A constructor.
-abstract class ConstructorElement extends FunctionElement
- implements MemberElement {
+abstract class ConstructorElement extends MethodElement {
/// Returns `true` if [effectiveTarget] has been computed for this
/// constructor.
bool get hasEffectiveTarget;
@@ -1470,7 +1475,7 @@ abstract class TypeDeclarationElement extends GenericElement {
}
abstract class ClassElement extends TypeDeclarationElement
- implements ScopeContainerElement {
+ implements ScopeContainerElement, ClassEntity {
/// The length of the longest inheritance path from [:Object:].
int get hierarchyDepth;
« no previous file with comments | « no previous file | pkg/compiler/lib/src/elements/entities.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698