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 * 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 Loading... |
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 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1759 if (!first) { | 1762 if (!first) { |
1760 sb.write('_'); | 1763 sb.write('_'); |
1761 } | 1764 } |
1762 sb.write('_'); | 1765 sb.write('_'); |
1763 visit(parameter); | 1766 visit(parameter); |
1764 first = true; | 1767 first = true; |
1765 } | 1768 } |
1766 } | 1769 } |
1767 } | 1770 } |
1768 } | 1771 } |
OLD | NEW |