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

Unified Diff: pkg/compiler/lib/src/resolution/class_members.dart

Issue 1299413002: Move common identifiers, names and selectors to a separate library. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 4 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/resolution/class_hierarchy.dart ('k') | pkg/compiler/lib/src/resolution/members.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/class_members.dart
diff --git a/pkg/compiler/lib/src/resolution/class_members.dart b/pkg/compiler/lib/src/resolution/class_members.dart
index 928f319ef756c543167865a935e57a87ac4d2eee..449173373f7fc9884d5d3f0024b21a44a29d57bd 100644
--- a/pkg/compiler/lib/src/resolution/class_members.dart
+++ b/pkg/compiler/lib/src/resolution/class_members.dart
@@ -4,6 +4,8 @@
library dart2js.resolution.compute_members;
+import '../common/names.dart' show
+ Identifiers;
import '../compiler.dart' show
Compiler,
isPrivateName;
@@ -60,7 +62,8 @@ abstract class MembersCreator {
bool shouldSkipName(String name) {
return computedMemberNames != null &&
- computedMemberNames.contains(name);
+ // 'call' is implicitly contained in [computedMemberNames].
+ (name == Identifiers.call || computedMemberNames.contains(name));
}
/// Compute all members of [cls] with the given names.
@@ -306,7 +309,7 @@ abstract class MembersCreator {
assert(!cls.isAbstract);
if (cls.asInstanceOf(compiler.functionClass) == null) return;
- if (cls.lookupMember(Compiler.CALL_OPERATOR_NAME) != null) return;
+ if (cls.lookupMember(Identifiers.call) != null) return;
// TODO(johnniwinther): Make separate methods for backend exceptions.
// Avoid warnings on backend implementation classes for closures.
if (compiler.backend.isBackendLibrary(cls.library)) return;
@@ -314,8 +317,8 @@ abstract class MembersCreator {
reportMessage(compiler.functionClass, MessageKind.UNIMPLEMENTED_METHOD, () {
compiler.reportWarning(cls, MessageKind.UNIMPLEMENTED_METHOD_ONE,
{'class': cls.name,
- 'name': Compiler.CALL_OPERATOR_NAME,
- 'method': Compiler.CALL_OPERATOR_NAME,
+ 'name': Identifiers.call,
+ 'method': Identifiers.call,
'declarer': compiler.functionClass.name});
});
}
@@ -845,7 +848,7 @@ abstract class ClassMemberMixin implements ClassElement {
if (computedMemberNames == null) {
computedMemberNames = _EMPTY_MEMBERS_NAMES;
}
- if (name != Compiler.CALL_OPERATOR_NAME) {
+ if (name != Identifiers.call) {
Setlet<String> set;
if (identical(computedMemberNames, _EMPTY_MEMBERS_NAMES)) {
computedMemberNames = set = new Setlet<String>();
@@ -872,7 +875,7 @@ abstract class ClassMemberMixin implements ClassElement {
if (computedMemberNames == null) {
return classMembers != null;
} else {
- return name == Compiler.CALL_OPERATOR_NAME ||
+ return name == Identifiers.call ||
computedMemberNames.contains(name);
}
}
« no previous file with comments | « pkg/compiler/lib/src/resolution/class_hierarchy.dart ('k') | pkg/compiler/lib/src/resolution/members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698