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: lib/compiler/implementation/ssa/js_names.dart

Issue 11262032: Add 'part of' in dart2js code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 ssa;
6
5 class JsNames { 7 class JsNames {
6 static const javaScriptKeywords = const <String>[ 8 static const javaScriptKeywords = const <String>[
7 // These are current keywords 9 // These are current keywords
8 "break", "delete", "function", "return", "typeof", "case", "do", "if", 10 "break", "delete", "function", "return", "typeof", "case", "do", "if",
9 "switch", "var", "catch", "else", "in", "this", "void", "continue", 11 "switch", "var", "catch", "else", "in", "this", "void", "continue",
10 "false", "instanceof", "throw", "while", "debugger", "finally", "new", 12 "false", "instanceof", "throw", "while", "debugger", "finally", "new",
11 "true", "with", "default", "for", "null", "try", 13 "true", "with", "default", "for", "null", "try",
12 14
13 // These are future keywords 15 // These are future keywords
14 "abstract", "double", "goto", "native", "static", "boolean", "enum", 16 "abstract", "double", "goto", "native", "static", "boolean", "enum",
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 static String getValid(String name) { 176 static String getValid(String name) {
175 if (reserved.contains(name)) { 177 if (reserved.contains(name)) {
176 name = '$name\$'; 178 name = '$name\$';
177 assert(!reserved.contains(name)); 179 assert(!reserved.contains(name));
178 } else if (name.contains(r'$')) { 180 } else if (name.contains(r'$')) {
179 name = name.replaceAll(r'$', r'$$'); 181 name = name.replaceAll(r'$', r'$$');
180 } 182 }
181 return name; 183 return name;
182 } 184 }
183 } 185 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/codegen_helpers.dart ('k') | lib/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698