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

Unified Diff: pkg/compiler/lib/src/js_backend/namer.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/namer.dart
diff --git a/pkg/compiler/lib/src/js_backend/namer.dart b/pkg/compiler/lib/src/js_backend/namer.dart
index 917295e42356ab41c9cf0f9301b8652dafe222cc..6156b277c2107c48dd750947b0bb977e9ad7b05a 100644
--- a/pkg/compiler/lib/src/js_backend/namer.dart
+++ b/pkg/compiler/lib/src/js_backend/namer.dart
@@ -460,14 +460,14 @@ class Namer {
String get deferredTypesName => 'deferredTypes';
String get isolateName => 'Isolate';
String get isolatePropertiesName => r'$isolateProperties';
- jsAst.Name get noSuchMethodName => publicInstanceMethodNameByArity(
- Compiler.NO_SUCH_METHOD, Compiler.NO_SUCH_METHOD_ARG_COUNT);
+ jsAst.Name get noSuchMethodName => invocationName(Selectors.noSuchMethod_);
+
/**
* Some closures must contain their name. The name is stored in
* [STATIC_CLOSURE_NAME_NAME].
*/
String get STATIC_CLOSURE_NAME_NAME => r'$name';
- String get closureInvocationSelectorName => Compiler.CALL_OPERATOR_NAME;
+ String get closureInvocationSelectorName => Identifiers.call;
bool get shouldMinify => false;
/// Returns the string that is to be used as the result of a call to
@@ -633,13 +633,6 @@ class Namer {
return invocationName(new Selector.fromElement(method));
}
- /// Annotated name for a public method with the given [originalName]
- /// and [arity] and no named parameters.
- jsAst.Name publicInstanceMethodNameByArity(String originalName,
- int arity) {
- return invocationName(new Selector.call(originalName, null, arity));
- }
-
/// Returns the annotated name for a variant of `call`.
/// The result has the form:
///
@@ -702,7 +695,7 @@ class Namer {
case SelectorKind.CALL:
List<String> suffix = callSuffixForStructure(selector.callStructure);
- if (selector.name == Compiler.CALL_OPERATOR_NAME) {
+ if (selector.name == Identifiers.call) {
// Derive the annotated name for this variant of 'call'.
return deriveCallMethodName(suffix);
}
« no previous file with comments | « pkg/compiler/lib/src/js_backend/js_backend.dart ('k') | pkg/compiler/lib/src/js_backend/no_such_method_registry.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698