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

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

Issue 2667473003: Move Entity and Local to entities.dart (Closed)
Patch Set: Created 3 years, 11 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/dump_info.dart ('k') | 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 516e880e3667202f2417c95702f3c937c9bbbddc..40c5a08689bd07d499f6f999388d24ce2cc81c3d 100644
--- a/pkg/compiler/lib/src/elements/elements.dart
+++ b/pkg/compiler/lib/src/elements/elements.dart
@@ -6,7 +6,6 @@ library elements;
import '../common.dart';
import '../common/resolution.dart' show Resolution;
-import '../compiler.dart' show Compiler;
import '../constants/constructors.dart';
import '../constants/expressions.dart';
import '../core_types.dart' show CommonElements;
@@ -118,19 +117,6 @@ class ElementKind {
toString() => id;
}
-/// Abstract interface for entities.
-///
-/// Implement this directly if the entity is not a Dart language entity.
-/// Entities defined within the Dart language should implement [Element].
-///
-/// For instance, the JavaScript backend need to create synthetic variables for
-/// calling intercepted classes and such variables do not correspond to an
-/// entity in the Dart source code nor in the terminology of the Dart language
-/// and should therefore implement [Entity] directly.
-abstract class Entity implements Spannable {
- String get name;
-}
-
/**
* A declared element of a program.
*
@@ -1171,7 +1157,9 @@ abstract class MemberElement extends Element
/// A function, variable or parameter defined in an executable context.
abstract class LocalElement extends Element
- implements AstElement, TypedElement, Local {}
+ implements AstElement, TypedElement, Local {
+ ExecutableElement get executableContext;
+}
/// A top level, static or instance field, a formal parameter or local variable.
abstract class VariableElement extends ExecutableElement {
@@ -1190,24 +1178,6 @@ abstract class VariableElement extends ExecutableElement {
ConstantExpression get constant;
}
-/// An entity that defines a local entity (memory slot) in generated code.
-///
-/// Parameters, local variables and local functions (can) define local entity
-/// and thus implement [Local] through [LocalElement]. For non-element locals,
-/// like `this` and boxes, specialized [Local] classes are created.
-///
-/// Type variables can introduce locals in factories and constructors
-/// but since one type variable can introduce different locals in different
-/// 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;
-}
-
/// A variable or parameter that is local to an executable context.
///
/// The executable context is the [ExecutableElement] in which this variable
« no previous file with comments | « pkg/compiler/lib/src/dump_info.dart ('k') | pkg/compiler/lib/src/elements/entities.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698