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

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

Issue 2804293002: Add MemberEntity.isAbstract and use MemberEntity in function_set.dart (Closed)
Patch Set: Inference doesn't like MemberEntity Created 3 years, 8 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/closure_tracer.dart ('k') | pkg/compiler/lib/src/inferrer/node_tracer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3296ff1481fcc9c3e716ea3934accb2ce40cb797..d42541c6c991d526ba4c03afb89b64823530b954 100644
--- a/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
+++ b/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
@@ -91,9 +91,9 @@ class InferrerEngine {
*/
void forEachElementMatching(
Selector selector, TypeMask mask, bool f(Element element)) {
- Iterable<Element> elements =
+ Iterable<MemberEntity> elements =
closedWorld.allFunctions.filter(selector, mask);
- for (Element e in elements) {
+ for (MemberElement e in elements) {
if (!f(e.implementation)) return;
}
}
@@ -442,8 +442,8 @@ class InferrerEngine {
print('${types.getInferredSignatureOf(info.element)} for '
'${info.element}');
} else if (info is DynamicCallSiteTypeInformation) {
- for (Element target in info.targets) {
- if (target is FunctionElement) {
+ for (MemberElement target in info.targets) {
+ if (target is MethodElement) {
print('${types.getInferredSignatureOf(target)} for ${target}');
} else {
print('${types.getInferredTypeOf(target).type} for ${target}');
@@ -563,7 +563,9 @@ class InferrerEngine {
// loop if it is a typed selector, to avoid marking too many
// methods as being called from within a loop. This cuts down
// on the code bloat.
- info.targets.forEach(closedWorldRefiner.addFunctionCalledInLoop);
+ info.targets.forEach((MemberElement element) {
+ closedWorldRefiner.addFunctionCalledInLoop(element);
+ });
}
});
}
@@ -883,7 +885,9 @@ class InferrerEngine {
arguments, sideEffects, inLoop);
}
- closedWorld.allFunctions.filter(selector, mask).forEach((callee) {
+ closedWorld.allFunctions
+ .filter(selector, mask)
+ .forEach((MemberElement callee) {
updateSideEffects(sideEffects, selector, callee);
});
« no previous file with comments | « pkg/compiler/lib/src/inferrer/closure_tracer.dart ('k') | pkg/compiler/lib/src/inferrer/node_tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698