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 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
868 String isolateBailoutAccess(Element element) { | 868 String isolateBailoutAccess(Element element) { |
869 String newName = getMappedGlobalName('${getNameX(element)}\$bailout'); | 869 String newName = getMappedGlobalName('${getNameX(element)}\$bailout'); |
870 return '${globalObjectFor(element)}.$newName'; | 870 return '${globalObjectFor(element)}.$newName'; |
871 } | 871 } |
872 | 872 |
873 String isolateLazyInitializerAccess(Element element) { | 873 String isolateLazyInitializerAccess(Element element) { |
874 return "${globalObjectFor(element)}.${getLazyInitializerName(element)}"; | 874 return "${globalObjectFor(element)}.${getLazyInitializerName(element)}"; |
875 } | 875 } |
876 | 876 |
877 String isolateStaticClosureAccess(Element element) { | 877 String isolateStaticClosureAccess(Element element) { |
878 return "${globalObjectFor(element)}.${getStaticClosureName(element)}"; | 878 return "${globalObjectFor(element)}.${getStaticClosureName(element)}()"; |
879 } | 879 } |
880 | 880 |
881 String globalObjectForConstant(Constant constant) => 'C'; | 881 String globalObjectForConstant(Constant constant) => 'C'; |
882 | 882 |
883 String operatorIsPrefix() => r'$is'; | 883 String operatorIsPrefix() => r'$is'; |
884 | 884 |
885 String operatorAsPrefix() => r'$as'; | 885 String operatorAsPrefix() => r'$as'; |
886 | 886 |
887 String operatorSignature() => r'$signature'; | 887 String operatorSignature() => r'$signature'; |
888 | 888 |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1379 if (!first) { | 1379 if (!first) { |
1380 sb.write('_'); | 1380 sb.write('_'); |
1381 } | 1381 } |
1382 sb.write('_'); | 1382 sb.write('_'); |
1383 visit(link.head); | 1383 visit(link.head); |
1384 first = true; | 1384 first = true; |
1385 } | 1385 } |
1386 } | 1386 } |
1387 } | 1387 } |
1388 } | 1388 } |
OLD | NEW |