| 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 * Names are generated through three stages: | 10 * Names are generated through three stages: |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 final String asyncPrefix = r"$async$"; | 324 final String asyncPrefix = r"$async$"; |
| 325 final String staticStateHolder = r'$'; | 325 final String staticStateHolder = r'$'; |
| 326 final String getterPrefix = r'get$'; | 326 final String getterPrefix = r'get$'; |
| 327 final String lazyGetterPrefix = r'$get$'; | 327 final String lazyGetterPrefix = r'$get$'; |
| 328 final String setterPrefix = r'set$'; | 328 final String setterPrefix = r'set$'; |
| 329 final String superPrefix = r'super$'; | 329 final String superPrefix = r'super$'; |
| 330 final String metadataField = '@'; | 330 final String metadataField = '@'; |
| 331 final String callPrefix = 'call'; | 331 final String callPrefix = 'call'; |
| 332 final String callCatchAllName = r'call*'; | 332 final String callCatchAllName = r'call*'; |
| 333 final String callNameField = r'$callName'; | 333 final String callNameField = r'$callName'; |
| 334 final String stubNameField = r'$stubName'; |
| 334 final String reflectableField = r'$reflectable'; | 335 final String reflectableField = r'$reflectable'; |
| 335 final String reflectionInfoField = r'$reflectionInfo'; | 336 final String reflectionInfoField = r'$reflectionInfo'; |
| 336 final String reflectionNameField = r'$reflectionName'; | 337 final String reflectionNameField = r'$reflectionName'; |
| 337 final String metadataIndexField = r'$metadataIndex'; | 338 final String metadataIndexField = r'$metadataIndex'; |
| 338 final String defaultValuesField = r'$defaultValues'; | 339 final String defaultValuesField = r'$defaultValues'; |
| 339 final String methodsWithOptionalArgumentsField = | 340 final String methodsWithOptionalArgumentsField = |
| 340 r'$methodsWithOptionalArguments'; | 341 r'$methodsWithOptionalArguments'; |
| 341 final String deferredAction = r'$deferredAction'; | 342 final String deferredAction = r'$deferredAction'; |
| 342 | 343 |
| 343 final String classDescriptorProperty = r'^'; | 344 final String classDescriptorProperty = r'^'; |
| (...skipping 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2054 void addSuggestion(String original, String suggestion) { | 2055 void addSuggestion(String original, String suggestion) { |
| 2055 assert(!_suggestedNames.containsKey(original)); | 2056 assert(!_suggestedNames.containsKey(original)); |
| 2056 _suggestedNames[original] = suggestion; | 2057 _suggestedNames[original] = suggestion; |
| 2057 } | 2058 } |
| 2058 | 2059 |
| 2059 bool hasSuggestion(String original) => _suggestedNames.containsKey(original); | 2060 bool hasSuggestion(String original) => _suggestedNames.containsKey(original); |
| 2060 bool isSuggestion(String candidate) { | 2061 bool isSuggestion(String candidate) { |
| 2061 return _suggestedNames.containsValue(candidate); | 2062 return _suggestedNames.containsValue(candidate); |
| 2062 } | 2063 } |
| 2063 } | 2064 } |
| OLD | NEW |