| 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 import 'dart:collection'; | 5 import 'dart:collection'; |
| 6 | 6 |
| 7 import '../js_ast/js_ast.dart'; | 7 import '../js_ast/js_ast.dart'; |
| 8 | 8 |
| 9 /// Unique instance for temporary variables. Will be renamed consistently | 9 /// Unique instance for temporary variables. Will be renamed consistently |
| 10 /// across the entire file. Different instances will be named differently | 10 /// across the entire file. Different instances will be named differently |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 case "protected": | 276 case "protected": |
| 277 case "public": | 277 case "public": |
| 278 case "static": | 278 case "static": |
| 279 case "yield": | 279 case "yield": |
| 280 return strictMode; | 280 return strictMode; |
| 281 } | 281 } |
| 282 return false; | 282 return false; |
| 283 } | 283 } |
| 284 | 284 |
| 285 /// Returns true for invalid static field names in strict mode. | 285 /// Returns true for invalid static field names in strict mode. |
| 286 /// In particular, "caller" "callee" and "arguments" cannot be used. | 286 /// In particular, "caller" "callee" "arguments" and "name" cannot be used. |
| 287 bool invalidStaticFieldName(String name) { | 287 bool invalidStaticFieldName(String name) { |
| 288 switch (name) { | 288 switch (name) { |
| 289 case "arguments": | 289 case "arguments": |
| 290 case "caller": | 290 case "caller": |
| 291 case "callee": | 291 case "callee": |
| 292 case "name": |
| 292 return true; | 293 return true; |
| 293 } | 294 } |
| 294 return false; | 295 return false; |
| 295 } | 296 } |
| OLD | NEW |