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

Unified Diff: pkg/compiler/lib/src/inferrer/inferrer_engine.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
Index: pkg/compiler/lib/src/inferrer/inferrer_engine.dart
diff --git a/pkg/compiler/lib/src/inferrer/inferrer_engine.dart b/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
index b04c4ab71245246dd9cd591d745ead504d619c03..085ac470f303d95269a19473c53aaf0e54528d96 100644
--- a/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
+++ b/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
@@ -123,9 +123,9 @@ abstract class InferrerEngine<T> {
Iterable<MemberEntity> getCallersOf(MemberEntity element);
// TODO(johnniwinther): Make this private again.
- GlobalTypeInferenceElementData dataOfMember(MemberEntity element);
+ GlobalTypeInferenceElementData<T> dataOfMember(MemberEntity element);
- GlobalTypeInferenceElementData lookupDataOfMember(MemberEntity element);
+ GlobalTypeInferenceElementData<T> lookupDataOfMember(MemberEntity element);
bool checkIfExposesThis(ConstructorEntity element);
@@ -194,8 +194,8 @@ abstract class InferrerEngine<T> {
MemberEntity caller,
ArgumentsTypes arguments,
SideEffects sideEffects,
- bool inLoop,
- bool isConditional);
+ {bool inLoop,
+ bool isConditional});
/// Update the assignments to parameters in the graph. [remove] tells whether
/// assignments must be added or removed. If [init] is false, parameters are
@@ -1004,8 +1004,8 @@ abstract class InferrerEngineImpl<T> extends InferrerEngine<T> {
MemberEntity caller,
ArgumentsTypes arguments,
SideEffects sideEffects,
- bool inLoop,
- bool isConditional) {
+ {bool inLoop,
+ bool isConditional}) {
if (selector.isClosureCall) {
return registerCalledClosure(node, selector, mask, receiverType, caller,
arguments, sideEffects, inLoop);
@@ -1105,7 +1105,7 @@ abstract class InferrerEngineImpl<T> extends InferrerEngine<T> {
}
TypeInformation typeOfMemberWithSelector(
- covariant MemberElement element, Selector selector) {
+ MemberEntity element, Selector selector) {
if (element.name == Identifiers.noSuchMethod_ &&
selector.name != element.name) {
// An invocation can resolve to a [noSuchMethod], in which case
@@ -1119,11 +1119,11 @@ abstract class InferrerEngineImpl<T> extends InferrerEngine<T> {
: types.functionType;
} else if (element.isField) {
return typeOfMember(element);
- } else if (Elements.isUnresolved(element)) {
- return types.dynamicType;
- } else {
- assert(element.isGetter);
+ } else if (element.isGetter) {
return returnTypeOfMember(element);
+ } else {
+ assert(element is MemberElement && Elements.isUnresolved(element));
+ return types.dynamicType;
}
} else if (element.isGetter || element.isField) {
assert(selector.isCall || selector.isSetter);
« no previous file with comments | « pkg/compiler/lib/src/inferrer/builder_kernel.dart ('k') | pkg/compiler/lib/src/inferrer/kernel_inferrer_engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698