| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of js_backend; | 5 part of js_backend; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Assigns JavaScript identifiers to Dart variables, class-names and members. | 8 * Assigns JavaScript identifiers to Dart variables, class-names and members. |
| 9 */ | 9 */ |
| 10 class Namer implements ClosureNamer { | 10 class Namer implements ClosureNamer { |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 popularNameCounters = new Map<String, int>(), | 282 popularNameCounters = new Map<String, int>(), |
| 283 constantNames = new Map<ConstantValue, String>(), | 283 constantNames = new Map<ConstantValue, String>(), |
| 284 constantLongNames = new Map<ConstantValue, String>(), | 284 constantLongNames = new Map<ConstantValue, String>(), |
| 285 constantHasher = new ConstantCanonicalHasher(compiler), | 285 constantHasher = new ConstantCanonicalHasher(compiler), |
| 286 functionTypeNamer = new FunctionTypeNamer(compiler); | 286 functionTypeNamer = new FunctionTypeNamer(compiler); |
| 287 | 287 |
| 288 JavaScriptBackend get backend => compiler.backend; | 288 JavaScriptBackend get backend => compiler.backend; |
| 289 | 289 |
| 290 String get isolateName => 'Isolate'; | 290 String get isolateName => 'Isolate'; |
| 291 String get isolatePropertiesName => r'$isolateProperties'; | 291 String get isolatePropertiesName => r'$isolateProperties'; |
| 292 String get noSuchMethodName => publicInstanceMethodNameByArity( |
| 293 Compiler.NO_SUCH_METHOD, Compiler.NO_SUCH_METHOD_ARG_COUNT); |
| 292 /** | 294 /** |
| 293 * Some closures must contain their name. The name is stored in | 295 * Some closures must contain their name. The name is stored in |
| 294 * [STATIC_CLOSURE_NAME_NAME]. | 296 * [STATIC_CLOSURE_NAME_NAME]. |
| 295 */ | 297 */ |
| 296 String get STATIC_CLOSURE_NAME_NAME => r'$name'; | 298 String get STATIC_CLOSURE_NAME_NAME => r'$name'; |
| 297 String get closureInvocationSelectorName => Compiler.CALL_OPERATOR_NAME; | 299 String get closureInvocationSelectorName => Compiler.CALL_OPERATOR_NAME; |
| 298 bool get shouldMinify => false; | 300 bool get shouldMinify => false; |
| 299 | 301 |
| 300 String getNameForJsGetName(Node node, String name) { | 302 String getNameForJsGetName(Node node, String name) { |
| 301 switch (name) { | 303 switch (name) { |
| (...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1416 if (!first) { | 1418 if (!first) { |
| 1417 sb.write('_'); | 1419 sb.write('_'); |
| 1418 } | 1420 } |
| 1419 sb.write('_'); | 1421 sb.write('_'); |
| 1420 visit(parameter); | 1422 visit(parameter); |
| 1421 first = true; | 1423 first = true; |
| 1422 } | 1424 } |
| 1423 } | 1425 } |
| 1424 } | 1426 } |
| 1425 } | 1427 } |
| OLD | NEW |