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

Side by Side Diff: dart/pkg/compiler/lib/src/js_backend/namer.dart

Issue 764353002: Follow up to CL 764533002. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r42279 and CL 760383003. Created 6 years 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
« no previous file with comments | « no previous file | dart/pkg/compiler/lib/src/js_emitter/old_emitter/class_builder.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 972 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 return r'$or'; 983 return r'$or';
984 } else if (name == '-') { 984 } else if (name == '-') {
985 return r'$sub'; 985 return r'$sub';
986 } else if (name == 'unary-') { 986 } else if (name == 'unary-') {
987 return r'$negate'; 987 return r'$negate';
988 } else { 988 } else {
989 return name; 989 return name;
990 } 990 }
991 } 991 }
992 992
993 String get incrementalHelperName => r'$dart_unsafe_eval';
994
995 jsAst.Expression get accessIncrementalHelper {
996 assert(compiler.hasIncrementalSupport);
997 return js('self.${incrementalHelperName}');
998 }
999
993 void forgetElement(Element element) { 1000 void forgetElement(Element element) {
994 String globalName = globals[element]; 1001 String globalName = globals[element];
995 invariant(element, globalName != null, message: 'No global name.'); 1002 invariant(element, globalName != null, message: 'No global name.');
996 usedGlobalNames.remove(globalName); 1003 usedGlobalNames.remove(globalName);
997 globals.remove(element); 1004 globals.remove(element);
998 } 1005 }
999 } 1006 }
1000 1007
1001 /** 1008 /**
1002 * Generator of names for [ConstantValue] values. 1009 * Generator of names for [ConstantValue] values.
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
1380 if (!first) { 1387 if (!first) {
1381 sb.write('_'); 1388 sb.write('_');
1382 } 1389 }
1383 sb.write('_'); 1390 sb.write('_');
1384 visit(parameter); 1391 visit(parameter);
1385 first = true; 1392 first = true;
1386 } 1393 }
1387 } 1394 }
1388 } 1395 }
1389 } 1396 }
OLDNEW
« no previous file with comments | « no previous file | dart/pkg/compiler/lib/src/js_emitter/old_emitter/class_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698