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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/namer.dart

Issue 209383005: Revert "Rename [call$...] properties to [$...] in compiled code." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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: sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
index 7a33d97692815cf9fa685560c7dac7eac3a63bf4..00a0bdbb873479e6391b62daec13aea5269f3435 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
@@ -221,7 +221,6 @@ class Namer implements ClosureNamer {
final String getterPrefix = r'get$';
final String setterPrefix = r'set$';
final String metadataField = '@';
- final String callPrefix = 'call';
final String callCatchAllName = r'call$catchAll';
final String reflectableField = r'$reflectable';
final String defaultValuesField = r'$defaultValues';
@@ -291,7 +290,6 @@ class Namer implements ClosureNamer {
switch (name) {
case 'GETTER_PREFIX': return getterPrefix;
case 'SETTER_PREFIX': return setterPrefix;
- case 'CALL_PREFIX': return callPrefix;
case 'CALL_CATCH_ALL': return callCatchAllName;
case 'REFLECTABLE': return reflectableField;
case 'CLASS_DESCRIPTOR_PROPERTY': return classDescriptorProperty;
@@ -385,16 +383,8 @@ class Namer implements ClosureNamer {
name = Elements.reconstructConstructorNameSourceString(element);
}
FunctionSignature signature = element.functionSignature;
- // We don't mangle the closure invoking function name because it
- // is generated by string concatenation in applyFunction from
- // js_helper.dart. To keep code size down, we potentially shorten
- // the prefix though.
- String methodName;
- if (name == closureInvocationSelectorName) {
- methodName = '$callPrefix\$${signature.parameterCount}';
- } else {
- methodName = '${privateName(library, name)}\$${signature.parameterCount}';
- }
+ String methodName =
+ '${privateName(library, name)}\$${signature.parameterCount}';
if (signature.optionalParametersAreNamed &&
!signature.optionalParameters.isEmpty) {
StringBuffer buffer = new StringBuffer();
@@ -413,11 +403,10 @@ class Namer implements ClosureNamer {
assert(!isPrivateName(name));
// We don't mangle the closure invoking function name because it
// is generated by string concatenation in applyFunction from
- // js_helper.dart. To keep code size down, we potentially shorten
- // the prefix though.
- if (name == closureInvocationSelectorName) return '$callPrefix\$$arity';
-
- return getMappedInstanceName('$name\$$arity');
+ // js_helper.dart.
+ String proposedName = '$name\$$arity';
+ if (name == closureInvocationSelectorName) return proposedName;
+ return getMappedInstanceName(proposedName);
}
String invocationName(Selector selector) {
@@ -443,9 +432,9 @@ class Namer implements ClosureNamer {
String suffix = '\$${selector.argumentCount}$buffer';
// We don't mangle the closure invoking function name because it
// is generated by string concatenation in applyFunction from
- // js_helper.dart. We potentially shorten the prefix though.
+ // js_helper.dart.
if (selector.isClosureCall()) {
- return "$callPrefix$suffix";
+ return "$name$suffix";
} else {
String proposedName = privateName(selector.library, name);
return getMappedInstanceName('$proposedName$suffix');
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart ('k') | sdk/lib/_internal/lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698