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

Unified Diff: pkg/compiler/lib/src/inferrer/type_graph_nodes.dart

Issue 2966053002: Use MemberEntity more in type_graph_nodes (Closed)
Patch Set: Created 3 years, 5 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/inferrer/type_graph_inferrer.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
index 2ca54a6bb5130b0d911e65d5ca7b08cfd4126e8f..e26022ded79d0efd9b0cc630a3366a5e837b60b9 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
@@ -60,7 +60,7 @@ abstract class TypeInformation {
final MemberTypeInformation context;
/// The element this [TypeInformation] node belongs to.
- MemberElement get contextMember => context == null ? null : context.member;
+ MemberEntity get contextMember => context == null ? null : context.member;
Iterable<TypeInformation> get assignments => _assignments;
@@ -203,7 +203,7 @@ abstract class TypeInformation {
/// The [Element] where this [TypeInformation] was created. May be `null`
/// for some [TypeInformation] nodes, where we do not need to store
/// the information.
- TypedElement get owner => (context != null) ? context.member : null;
+ MemberEntity get owner => (context != null) ? context.member : null;
/// Returns whether the type cannot change after it has been
/// inferred.
@@ -389,7 +389,7 @@ abstract class MemberTypeInformation extends ElementTypeInformation
* The global information is summarized in [cleanup], after which [_callers]
* is set to `null`.
*/
- Map<MemberElement, Setlet<Spannable>> _callers;
+ Map<MemberEntity, Setlet<Spannable>> _callers;
MemberTypeInformation._internal(this._member) : super._internal(null);
@@ -397,13 +397,13 @@ abstract class MemberTypeInformation extends ElementTypeInformation
String get debugName => '$member';
- void addCall(MemberElement caller, Spannable node) {
+ void addCall(MemberEntity caller, Spannable node) {
assert(node is ast.Node || node is Element);
- _callers ??= <MemberElement, Setlet<Spannable>>{};
+ _callers ??= <MemberEntity, Setlet<Spannable>>{};
_callers.putIfAbsent(caller, () => new Setlet()).add(node);
}
- void removeCall(MemberElement caller, node) {
+ void removeCall(MemberEntity caller, node) {
if (_callers == null) return;
Setlet calls = _callers[caller];
if (calls == null) return;
@@ -413,7 +413,7 @@ abstract class MemberTypeInformation extends ElementTypeInformation
}
}
- Iterable<MemberElement> get callers {
+ Iterable<MemberEntity> get callers {
// TODO(sra): This is called only from an unused API and a test. If it
// becomes used, [cleanup] will need to copy `_caller.keys`.
@@ -650,7 +650,7 @@ class FactoryConstructorTypeInformation extends MemberTypeInformation {
class GenerativeConstructorTypeInformation extends MemberTypeInformation {
ConstructorEntity get _constructor => _member;
- GenerativeConstructorTypeInformation(ConstructorElement element)
+ GenerativeConstructorTypeInformation(ConstructorEntity element)
: super._internal(element);
TypeMask handleSpecialCases(InferrerEngine inferrer) {
« no previous file with comments | « pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698