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

Unified Diff: sdk/lib/_internal/compiler/implementation/inferrer/node_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/node_tracer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/node_tracer.dart b/sdk/lib/_internal/compiler/implementation/inferrer/node_tracer.dart
index 10838299795508ce81fda68fe4956a978d83fb0b..3ffccd5dc6223ab1cf69cdc552b0891a99d6470a 100644
--- a/sdk/lib/_internal/compiler/implementation/inferrer/node_tracer.dart
+++ b/sdk/lib/_internal/compiler/implementation/inferrer/node_tracer.dart
@@ -208,7 +208,7 @@ abstract class TracerVisitor<T extends TypeInformation>
flow.users.forEach((user) {
if (user is !DynamicCallSiteTypeInformation) return;
if (user.receiver != flow) return;
- if (user.selector.isIndex()) {
+ if (user.selector.isIndex) {
addNewEscapeInformation(user);
} else if (!doesNotEscapeMapSet.contains(user.selector.name)) {
bailout('Escape from a map via [${user.selector.name}]');
@@ -308,8 +308,8 @@ abstract class TracerVisitor<T extends TypeInformation>
* [isAddedToContainer].
*/
bool isParameterOfListAddingMethod(Element element) {
- if (!element.isParameter()) return false;
- if (element.getEnclosingClass() != compiler.backend.listImplementation) {
+ if (!element.isParameter) return false;
+ if (element.enclosingClass != compiler.backend.listImplementation) {
return false;
}
Element method = element.enclosingElement;
@@ -324,8 +324,8 @@ abstract class TracerVisitor<T extends TypeInformation>
* [isValueAddedToMap] and [isKeyAddedToMap].
*/
bool isParameterOfMapAddingMethod(Element element) {
- if (!element.isParameter()) return false;
- if (element.getEnclosingClass() != compiler.backend.mapImplementation) {
+ if (!element.isParameter) return false;
+ if (element.enclosingClass != compiler.backend.mapImplementation) {
return false;
}
Element method = element.enclosingElement;
@@ -333,23 +333,23 @@ abstract class TracerVisitor<T extends TypeInformation>
}
bool isClosure(Element element) {
- if (!element.isFunction()) return false;
+ if (!element.isFunction) return false;
/// Creating an instance of a class that implements [Function] also
/// closurizes the corresponding [call] member. We do not currently
/// track these, thus the check for [isClosurized] on such a method will
/// return false. Instead we catch that case here for now.
// TODO(herhut): Handle creation of closures from instances of Function.
- if (element.isInstanceMember() &&
+ if (element.isInstanceMember &&
element.name == Compiler.CALL_OPERATOR_NAME) {
return true;
}
- Element outermost = element.getOutermostEnclosingMemberOrTopLevel();
+ Element outermost = element.outermostEnclosingMemberOrTopLevel;
return outermost.declaration != element.declaration;
}
void visitElementTypeInformation(ElementTypeInformation info) {
Element element = info.element;
- if (element.isParameter()
+ if (element.isParameter
&& inferrer.isNativeElement(element.enclosingElement)) {
bailout('Passed to a native method');
}

Powered by Google App Engine
This is Rietveld 408576698