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

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

Issue 2955353002: Split inference type-info accessors into members, parameters and local functions (Closed)
Patch Set: Updated cf. comments Created 3 years, 6 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/closure_tracer.dart
diff --git a/pkg/compiler/lib/src/inferrer/closure_tracer.dart b/pkg/compiler/lib/src/inferrer/closure_tracer.dart
index f6a674bbb40dba1db6c7f029e486fa126c5e7250..0c7eed2d732dca35ef8010c7eb1c6d0319467542 100644
--- a/pkg/compiler/lib/src/inferrer/closure_tracer.dart
+++ b/pkg/compiler/lib/src/inferrer/closure_tracer.dart
@@ -32,7 +32,7 @@ class ClosureTracerVisitor extends TracerVisitor {
for (FunctionElement e in tracedElements) {
e.functionSignature.forEachParameter((Element parameter) {
ElementTypeInformation info =
- inferrer.types.getInferredTypeOf(parameter);
+ inferrer.types.getInferredTypeOfParameter(parameter);
info.disableInferenceForClosures = false;
});
}
@@ -87,7 +87,7 @@ class ClosureTracerVisitor extends TracerVisitor {
if (called.isGetter &&
info.selector != null &&
info.selector.isCall &&
- inferrer.types.getInferredTypeOf(called) == currentUser) {
+ inferrer.types.getInferredTypeOfMember(called) == currentUser) {
// This node can be a closure call as well. For example, `foo()`
// where `foo` is a getter.
_registerCallForLaterAnalysis(info);
@@ -100,8 +100,8 @@ class ClosureTracerVisitor extends TracerVisitor {
}
}
- bool _checkIfCurrentUser(element) =>
- inferrer.types.getInferredTypeOf(element) == currentUser;
+ bool _checkIfCurrentUser(MemberElement element) =>
+ inferrer.types.getInferredTypeOfMember(element) == currentUser;
bool _checkIfFunctionApply(MemberElement element) {
return inferrer.closedWorld.commonElements.isFunctionApplyMethod(element);
« no previous file with comments | « pkg/compiler/lib/src/inferrer/builder_kernel.dart ('k') | pkg/compiler/lib/src/inferrer/inferrer_engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698