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

Unified Diff: pkg/compiler/lib/src/elements/modelx.dart

Issue 1152903003: Create SendStructure for unary and binary in resolution. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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: pkg/compiler/lib/src/elements/modelx.dart
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
index 5c94d94e4e5f67e5be6ca85787c54a3d1a52ad45..34a58455ba46f996b5cb71f86bfb052676028243 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -2477,7 +2477,7 @@ abstract class BaseClassElementX extends ElementX
}
/**
- * Find the first member in the class chain with the given [selector].
+ * Find the first member in the class chain with the given [memberName].
*
* This method is NOT to be used for resolving
* unqualified sends because it does not implement the scoping
@@ -2486,19 +2486,19 @@ abstract class BaseClassElementX extends ElementX
* When called on the implementation element both members declared in the
* origin and the patch class are returned.
*/
- Element lookupSelector(Selector selector) {
- return internalLookupSelector(selector, false);
+ Element lookupByName(Name memberName) {
+ return internalLookupByName(memberName, isSuperLookup: false);
}
- Element lookupSuperSelector(Selector selector) {
- return internalLookupSelector(selector, true);
+ Element lookupSuperByName(Name memberName) {
+ return internalLookupByName(memberName, isSuperLookup: true);
}
- Element internalLookupSelector(Selector selector,
- bool isSuperLookup) {
- String name = selector.name;
- bool isPrivate = isPrivateName(name);
- LibraryElement library = selector.library;
+ Element internalLookupByName(Name memberName,
+ {bool isSuperLookup}) {
karlklose 2015/05/26 08:23:32 Fix indentation. Does it fit on one line now?
Johnni Winther 2015/05/26 08:53:11 Done.
+ String name = memberName.text;
+ bool isPrivate = memberName.isPrivate;
+ LibraryElement library = memberName.library;
for (ClassElement current = isSuperLookup ? superclass : this;
current != null;
current = current.superclass) {
@@ -2520,12 +2520,15 @@ abstract class BaseClassElementX extends ElementX
AbstractFieldElement field = member;
FunctionElement getter = field.getter;
FunctionElement setter = field.setter;
- if (selector.isSetter) {
+ if (memberName.isSetter) {
// Abstract members can be defined in a super class.
- if (setter != null && !setter.isAbstract) return setter;
+ if (setter != null && !setter.isAbstract) {
+ return setter;
+ }
} else {
- assert(selector.isGetter || selector.isCall);
- if (getter != null && !getter.isAbstract) return getter;
+ if (getter != null && !getter.isAbstract) {
+ return getter;
+ }
}
// Abstract members can be defined in a super class.
} else if (!member.isAbstract) {

Powered by Google App Engine
This is Rietveld 408576698