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

Unified Diff: pkg/compiler/lib/src/js_backend/namer.dart

Issue 767643002: dart2js: Make usage of names more consistent between compiler and runtime. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 6 years, 1 month 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/js_backend/js_backend.dart ('k') | pkg/compiler/lib/src/js_backend/runtime_types.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c4ab7b4361e01a4e838d249ee527e96abec772fd..a4a158fcc53b2a267d732b397cb258b0f7fec064 100644
--- a/pkg/compiler/lib/src/js_backend/namer.dart
+++ b/pkg/compiler/lib/src/js_backend/namer.dart
@@ -892,25 +892,25 @@ class Namer implements ClosureNamer {
String globalObjectForConstant(ConstantValue constant) => 'C';
- String operatorIsPrefix() => r'$is';
+ String get operatorIsPrefix => r'$is';
- String operatorAsPrefix() => r'$as';
+ String get operatorAsPrefix => r'$as';
- String operatorSignature() => r'$signature';
+ String get operatorSignature => r'$signature';
- String typedefTag() => r'typedef';
+ String get typedefTag => r'typedef';
- String functionTypeTag() => r'func';
+ String get functionTypeTag => r'func';
- String functionTypeVoidReturnTag() => r'void';
+ String get functionTypeVoidReturnTag => r'void';
- String functionTypeReturnTypeTag() => r'ret';
+ String get functionTypeReturnTypeTag => r'ret';
- String functionTypeRequiredParametersTag() => r'args';
+ String get functionTypeRequiredParametersTag => r'args';
- String functionTypeOptionalParametersTag() => r'opt';
+ String get functionTypeOptionalParametersTag => r'opt';
- String functionTypeNamedParametersTag() => r'named';
+ String get functionTypeNamedParametersTag => r'named';
Map<FunctionType,String> functionTypeNameMap =
new Map<FunctionType,String>();
@@ -928,14 +928,14 @@ class Namer implements ClosureNamer {
String operatorIsType(DartType type) {
if (type.isFunctionType) {
// TODO(erikcorry): Reduce from $isx to ix when we are minifying.
- return '${operatorIsPrefix()}_${getFunctionTypeName(type)}';
+ return '${operatorIsPrefix}_${getFunctionTypeName(type)}';
}
return operatorIs(type.element);
}
String operatorIs(Element element) {
// TODO(erikcorry): Reduce from $isx to ix when we are minifying.
- return '${operatorIsPrefix()}${getRuntimeTypeName(element)}';
+ return '${operatorIsPrefix}${getRuntimeTypeName(element)}';
}
/*
@@ -954,7 +954,7 @@ class Namer implements ClosureNamer {
// TODO(ahe): Creating a string here is unfortunate. It is slow (due to
// string concatenation in the implementation), and may prevent
// segmentation of '$'.
- return '${operatorAsPrefix()}${getNameForRti(element)}';
+ return '${operatorAsPrefix}${getNameForRti(element)}';
}
String safeName(String name) => _safeName(name, jsReserved);
« no previous file with comments | « pkg/compiler/lib/src/js_backend/js_backend.dart ('k') | pkg/compiler/lib/src/js_backend/runtime_types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698