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

Unified Diff: pkg/compiler/lib/src/js_backend/no_such_method_registry.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
Index: pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
diff --git a/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart b/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
index 38d4704009e835ebe2f75b70d66b7dd506c61294..eb4f42c5ace9ccabab08004114b7cd89cae6aa74 100644
--- a/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
+++ b/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
@@ -104,7 +104,7 @@ class NoSuchMethodRegistry {
/// implementation. An implementation is complex if it falls into
/// category C, as described above.
bool isComplex(FunctionElement element) {
- assert(element.name == Compiler.NO_SUCH_METHOD);
+ assert(element.name == Identifiers.noSuchMethod_);
return otherImpls.contains(element);
}
@@ -119,7 +119,7 @@ class NoSuchMethodRegistry {
}
NsmCategory _categorizeImpl(FunctionElement element) {
- assert(element.name == Compiler.NO_SUCH_METHOD);
+ assert(element.name == Identifiers.noSuchMethod_);
if (defaultImpls.contains(element)) {
return NsmCategory.DEFAULT;
}
@@ -129,7 +129,7 @@ class NoSuchMethodRegistry {
if (otherImpls.contains(element)) {
return NsmCategory.OTHER;
}
- if (!_compiler.noSuchMethodSelector.signatureApplies(element)) {
+ if (!Selectors.noSuchMethod_.signatureApplies(element)) {
otherImpls.add(element);
return NsmCategory.OTHER;
}
@@ -140,7 +140,7 @@ class NoSuchMethodRegistry {
// If the implementation is 'noSuchMethod(x) => super.noSuchMethod(x);'
// then it is in the same category as the super call.
Element superCall = element.enclosingClass
- .lookupSuperByName(_compiler.noSuchMethodSelector.memberName);
+ .lookupSuperByName(Selectors.noSuchMethod_.memberName);
NsmCategory category = _categorizeImpl(superCall);
switch(category) {
case NsmCategory.DEFAULT:
@@ -190,7 +190,7 @@ class NoSuchMethodRegistry {
if (expr is Send &&
expr.isSuperCall &&
expr.selector is Identifier &&
- (expr.selector as Identifier).source == Compiler.NO_SUCH_METHOD) {
+ (expr.selector as Identifier).source == Identifiers.noSuchMethod_) {
var arg = expr.arguments.head;
if (expr.arguments.tail.isEmpty &&
arg is Send &&
« no previous file with comments | « pkg/compiler/lib/src/js_backend/namer.dart ('k') | pkg/compiler/lib/src/js_emitter/class_stub_generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698