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

Unified Diff: sdk/lib/_internal/compiler/implementation/inferrer/closure_tracer.dart

Issue 266913017: Convert property methods into getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 6 years, 7 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: sdk/lib/_internal/compiler/implementation/inferrer/closure_tracer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/closure_tracer.dart b/sdk/lib/_internal/compiler/implementation/inferrer/closure_tracer.dart
index 8ec3700da0a1354cf6fcece89214a990b0bef7ca..9293b4380be26d27c2935c576ef09c97dd87bd03 100644
--- a/sdk/lib/_internal/compiler/implementation/inferrer/closure_tracer.dart
+++ b/sdk/lib/_internal/compiler/implementation/inferrer/closure_tracer.dart
@@ -67,9 +67,9 @@ class ClosureTracerVisitor extends TracerVisitor<ApplyableTypeInformation> {
bailout('Used in JS ${info.call}');
}
}
- if (called.isGetter()
+ if (called.isGetter
&& info.selector != null
- && info.selector.isCall()
+ && info.selector.isCall
&& inferrer.types.getInferredTypeOf(called) == currentUser) {
// This node can be a closure call as well. For example, `foo()`
// where `foo` is a getter.
@@ -92,9 +92,9 @@ class ClosureTracerVisitor extends TracerVisitor<ApplyableTypeInformation> {
visitDynamicCallSiteTypeInformation(DynamicCallSiteTypeInformation info) {
super.visitDynamicCallSiteTypeInformation(info);
- if (info.selector.isCall()) {
+ if (info.selector.isCall) {
if (info.arguments.contains(currentUser)) {
- if (!info.targets.every((element) => element.isFunction())) {
+ if (!info.targets.every((element) => element.isFunction)) {
bailout('Passed to a closure');
}
if (info.targets.any(checkIfFunctionApply)) {
@@ -103,7 +103,7 @@ class ClosureTracerVisitor extends TracerVisitor<ApplyableTypeInformation> {
} else if (info.targets.any((element) => checkIfCurrentUser(element))) {
analyzeCall(info);
}
- } else if (info.selector.isGetter() &&
+ } else if (info.selector.isGetter &&
info.selector.name == Compiler.CALL_OPERATOR_NAME) {
// We are potentially tearing off ourself here
addNewEscapeInformation(info);
@@ -119,7 +119,7 @@ class StaticTearOffClosureTracerVisitor extends ClosureTracerVisitor {
super.visitStaticCallSiteTypeInformation(info);
if (info.calledElement == tracedElements.first
&& info.selector != null
- && info.selector.isGetter()) {
+ && info.selector.isGetter) {
addNewEscapeInformation(info);
}
}

Powered by Google App Engine
This is Rietveld 408576698