| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library dev_compiler.src.codegen.js_names; | 5 library dev_compiler.src.codegen.js_names; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'package:dev_compiler/src/js/js_ast.dart'; | 8 import 'package:dev_compiler/src/js/js_ast.dart'; |
| 9 | 9 |
| 10 /// Unique instance for temporary variables. Will be renamed consistently | 10 /// Unique instance for temporary variables. Will be renamed consistently |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 case "with": | 224 case "with": |
| 225 case "yield": | 225 case "yield": |
| 226 return true; | 226 return true; |
| 227 case "arguments": | 227 case "arguments": |
| 228 case "eval": | 228 case "eval": |
| 229 return strictMode; | 229 return strictMode; |
| 230 } | 230 } |
| 231 return false; | 231 return false; |
| 232 } | 232 } |
| 233 | 233 |
| 234 /// Returns true for invalid static method names in strict mode. | 234 /// Returns true for invalid static field names in strict mode. |
| 235 /// In particular, "caller" "callee" and "arguments" cannot be used. | 235 /// In particular, "caller" "callee" and "arguments" cannot be used. |
| 236 bool invalidStaticMethodName(String name) { | 236 bool invalidStaticFieldName(String name) { |
| 237 switch (name) { | 237 switch (name) { |
| 238 case "arguments": | 238 case "arguments": |
| 239 case "caller": | 239 case "caller": |
| 240 case "callee": | 240 case "callee": |
| 241 return true; | 241 return true; |
| 242 } | 242 } |
| 243 return false; | 243 return false; |
| 244 } | 244 } |
| OLD | NEW |