Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: dart/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart

Issue 27524003: Generate tear-off closures dynamically. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698