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

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

Issue 1032783003: dart2js: use Es6 maps when available. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move code around Created 5 years, 9 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 * Names are generated through three stages: 10 * Names are generated through three stages:
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 "MouseEvent", "Navigator", "Node", "NodeList", "Option", "Plugin", 238 "MouseEvent", "Navigator", "Node", "NodeList", "Option", "Plugin",
239 "ProcessingInstruction", "Range", "RangeException", "Screen", "Select", 239 "ProcessingInstruction", "Range", "RangeException", "Screen", "Select",
240 "Table", "TableCell", "TableRow", "TableSelection", "Text", "TextArea", 240 "Table", "TableCell", "TableRow", "TableSelection", "Text", "TextArea",
241 "UIEvent", "Window", "XMLHttpRequest", "XMLSerializer", 241 "UIEvent", "Window", "XMLHttpRequest", "XMLSerializer",
242 "XPathException", "XPathResult", "XSLTProcessor", 242 "XPathException", "XPathResult", "XSLTProcessor",
243 243
244 // These keywords trigger the loading of the java-plugin. For the 244 // These keywords trigger the loading of the java-plugin. For the
245 // next-generation plugin, this results in starting a new Java process. 245 // next-generation plugin, this results in starting a new Java process.
246 "java", "Packages", "netscape", "sun", "JavaObject", "JavaClass", 246 "java", "Packages", "netscape", "sun", "JavaObject", "JavaClass",
247 "JavaArray", "JavaMember", 247 "JavaArray", "JavaMember",
248
249 // ES6 collections.
250 "Map",
248 ]; 251 ];
249 252
250 static const List<String> reservedGlobalObjectNames = const <String>[ 253 static const List<String> reservedGlobalObjectNames = const <String>[
251 "A", 254 "A",
252 "B", 255 "B",
253 "C", // Global object for *C*onstants. 256 "C", // Global object for *C*onstants.
254 "D", 257 "D",
255 "E", 258 "E",
256 "F", 259 "F",
257 "G", 260 "G",
(...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after
1767 if (!first) { 1770 if (!first) {
1768 sb.write('_'); 1771 sb.write('_');
1769 } 1772 }
1770 sb.write('_'); 1773 sb.write('_');
1771 visit(parameter); 1774 visit(parameter);
1772 first = true; 1775 first = true;
1773 } 1776 }
1774 } 1777 }
1775 } 1778 }
1776 } 1779 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698