| 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 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 } | 795 } |
| 796 | 796 |
| 797 String getNameForRti(Element element) => getNameX(element); | 797 String getNameForRti(Element element) => getNameX(element); |
| 798 | 798 |
| 799 String getNameOfLibrary(LibraryElement library) => getNameX(library); | 799 String getNameOfLibrary(LibraryElement library) => getNameX(library); |
| 800 | 800 |
| 801 String getNameOfClass(ClassElement cls) => getNameX(cls); | 801 String getNameOfClass(ClassElement cls) => getNameX(cls); |
| 802 | 802 |
| 803 String getNameOfField(VariableElement field) => getNameX(field); | 803 String getNameOfField(VariableElement field) => getNameX(field); |
| 804 | 804 |
| 805 // TODO(ahe): Remove this method. Use get getNameOfMember instead. |
| 805 String getNameOfInstanceMember(Element member) => getNameX(member); | 806 String getNameOfInstanceMember(Element member) => getNameX(member); |
| 806 | 807 |
| 808 String getNameOfMember(Element member) => getNameX(member); |
| 809 |
| 807 String getNameOfGlobalField(VariableElement field) => getNameX(field); | 810 String getNameOfGlobalField(VariableElement field) => getNameX(field); |
| 808 | 811 |
| 812 // TODO(ahe): Remove this method. Use get getNameOfMember instead. |
| 809 String getNameOfGlobalFunction(FunctionElement element) => getNameX(element); | 813 String getNameOfGlobalFunction(FunctionElement element) => getNameX(element); |
| 810 | 814 |
| 811 /// Returns true if [element] is stored on CURRENT_ISOLATE ('$'). We intend | 815 /// Returns true if [element] is stored on CURRENT_ISOLATE ('$'). We intend |
| 812 /// to store only mutable static state in [CURRENT_ISOLATE], constants are | 816 /// to store only mutable static state in [CURRENT_ISOLATE], constants are |
| 813 /// stored in 'C', and functions, accessors, classes, etc. are stored in one | 817 /// stored in 'C', and functions, accessors, classes, etc. are stored in one |
| 814 /// of the other objects in [reservedGlobalObjectNames]. | 818 /// of the other objects in [reservedGlobalObjectNames]. |
| 815 bool isPropertyOfCurrentIsolate(Element element) { | 819 bool isPropertyOfCurrentIsolate(Element element) { |
| 816 // TODO(ahe): Make sure this method's documentation is always true and | 820 // TODO(ahe): Make sure this method's documentation is always true and |
| 817 // remove the word "intend". | 821 // remove the word "intend". |
| 818 return | 822 return |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1375 if (!first) { | 1379 if (!first) { |
| 1376 sb.write('_'); | 1380 sb.write('_'); |
| 1377 } | 1381 } |
| 1378 sb.write('_'); | 1382 sb.write('_'); |
| 1379 visit(link.head); | 1383 visit(link.head); |
| 1380 first = true; | 1384 first = true; |
| 1381 } | 1385 } |
| 1382 } | 1386 } |
| 1383 } | 1387 } |
| 1384 } | 1388 } |
| OLD | NEW |