| 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.namer; | 5 part of js_backend.namer; |
| 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 MinifyNamer extends Namer | 10 class MinifyNamer extends Namer |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 return _disambiguateMemberByKey( | 367 return _disambiguateMemberByKey( |
| 368 key, () => _proposeNameForConstructorBody(method)); | 368 key, () => _proposeNameForConstructorBody(method)); |
| 369 } | 369 } |
| 370 } | 370 } |
| 371 | 371 |
| 372 abstract class _MinifiedOneShotInterceptorNamer implements Namer { | 372 abstract class _MinifiedOneShotInterceptorNamer implements Namer { |
| 373 /// Property name used for the one-shot interceptor method for the given | 373 /// Property name used for the one-shot interceptor method for the given |
| 374 /// [selector] and return-type specialization. | 374 /// [selector] and return-type specialization. |
| 375 @override | 375 @override |
| 376 jsAst.Name nameForGetOneShotInterceptor( | 376 jsAst.Name nameForGetOneShotInterceptor( |
| 377 Selector selector, Iterable<ClassElement> classes) { | 377 Selector selector, Iterable<ClassEntity> classes) { |
| 378 String root = selector.isOperator | 378 String root = selector.isOperator |
| 379 ? operatorNameToIdentifier(selector.name) | 379 ? operatorNameToIdentifier(selector.name) |
| 380 : privateName(selector.memberName); | 380 : privateName(selector.memberName); |
| 381 String prefix = | 381 String prefix = |
| 382 selector.isGetter ? r"$get" : selector.isSetter ? r"$set" : ""; | 382 selector.isGetter ? r"$get" : selector.isSetter ? r"$set" : ""; |
| 383 String callSuffix = selector.isCall | 383 String callSuffix = selector.isCall |
| 384 ? callSuffixForStructure(selector.callStructure).join() | 384 ? callSuffixForStructure(selector.callStructure).join() |
| 385 : ""; | 385 : ""; |
| 386 String suffix = suffixForGetInterceptor(classes); | 386 String suffix = suffixForGetInterceptor(classes); |
| 387 String fullName = "\$intercepted$prefix\$$root$callSuffix\$$suffix"; | 387 String fullName = "\$intercepted$prefix\$$root$callSuffix\$$suffix"; |
| 388 return _disambiguateInternalGlobal(fullName); | 388 return _disambiguateInternalGlobal(fullName); |
| 389 } | 389 } |
| 390 } | 390 } |
| OLD | NEW |