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

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

Issue 3008133002: Handle local invoke in inferrer (Closed)
Patch Set: Updated cf. comment Created 3 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 | « pkg/compiler/lib/src/inferrer/kernel_inferrer_engine.dart ('k') | pkg/compiler/lib/src/types/types.dart » ('j') | 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 25632dbe81dcafb8e007316bd38b0eee8576e816..3e5635ae1858b5409349425bc1f9942be32a1673 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
@@ -6,6 +6,8 @@ library compiler.src.inferrer.type_graph_nodes;
import 'dart:collection' show IterableBase;
+import 'package:kernel/ast.dart' as ir;
+
import '../common.dart';
import '../common/names.dart' show Identifiers;
import '../constants/values.dart';
@@ -382,12 +384,13 @@ abstract class MemberTypeInformation extends ElementTypeInformation
* to enable counting the global number of call sites of [element].
*
* A call site is either an AST [ast.Node], an [Element] (see uses of
- * [synthesizeForwardingCall] in [SimpleTypeInferrerVisitor]).
+ * [synthesizeForwardingCall] in [SimpleTypeInferrerVisitor]) or an IR
+ * [ir.Node].
*
* The global information is summarized in [cleanup], after which [_callers]
* is set to `null`.
*/
- Map<MemberEntity, Setlet<Spannable>> _callers;
+ Map<MemberEntity, Setlet<Object>> _callers;
MemberTypeInformation._internal(this._member) : super._internal(null) {
assert(_checkMember(_member));
@@ -401,12 +404,12 @@ abstract class MemberTypeInformation extends ElementTypeInformation
String get debugName => '$member';
- void addCall(MemberEntity caller, Spannable node) {
- _callers ??= <MemberEntity, Setlet<Spannable>>{};
+ void addCall(MemberEntity caller, Object node) {
+ _callers ??= <MemberEntity, Setlet<Object>>{};
_callers.putIfAbsent(caller, () => new Setlet()).add(node);
}
- void removeCall(MemberEntity caller, node) {
+ void removeCall(MemberEntity caller, Object node) {
if (_callers == null) return;
Setlet calls = _callers[caller];
if (calls == null) return;
@@ -831,7 +834,7 @@ bool validCallType(CallType callType, Object call) {
case CallType.complex:
return call is ast.SendSet;
case CallType.access:
- return call is ast.Send;
+ return call is ast.Send || call is ir.Node;
case CallType.forIn:
return call is ast.ForIn;
}
@@ -863,7 +866,8 @@ abstract class CallSiteTypeInformation extends TypeInformation
assert(_checkCaller(caller));
// [_call] is either an AST node or a constructor element in case of a
// a forwarding constructor _call.
- assert(_call is ast.Node || _call is ConstructorElement);
+ assert(
+ _call is ast.Node || _call is ConstructorElement || _call is ir.Node);
}
bool _checkCaller(MemberEntity caller) {
« no previous file with comments | « pkg/compiler/lib/src/inferrer/kernel_inferrer_engine.dart ('k') | pkg/compiler/lib/src/types/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698