| 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 /// The ES6 name for the Dart SDK. All dart:* libraries are in this module. |
| 10 const String dartSdkModule = 'dart_sdk'; |
| 11 |
| 9 /// Unique instance for temporary variables. Will be renamed consistently | 12 /// Unique instance for temporary variables. Will be renamed consistently |
| 10 /// across the entire file. Different instances will be named differently | 13 /// across the entire file. Different instances will be named differently |
| 11 /// even if they have the same name, this makes it safe to use in code | 14 /// even if they have the same name, this makes it safe to use in code |
| 12 /// generation without needing global knowledge. See [TemporaryNamer]. | 15 /// generation without needing global knowledge. See [TemporaryNamer]. |
| 13 // TODO(jmesserly): move into js_ast? add a boolean to Identifier? | 16 // TODO(jmesserly): move into js_ast? add a boolean to Identifier? |
| 14 class TemporaryId extends Identifier { | 17 class TemporaryId extends Identifier { |
| 15 TemporaryId(String name) : super(name); | 18 TemporaryId(String name) : super(name); |
| 16 } | 19 } |
| 17 | 20 |
| 18 /// Creates a qualified identifier, without determining for sure if it needs to | 21 /// Creates a qualified identifier, without determining for sure if it needs to |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 bool invalidStaticFieldName(String name) { | 290 bool invalidStaticFieldName(String name) { |
| 288 switch (name) { | 291 switch (name) { |
| 289 case "arguments": | 292 case "arguments": |
| 290 case "caller": | 293 case "caller": |
| 291 case "callee": | 294 case "callee": |
| 292 case "name": | 295 case "name": |
| 293 return true; | 296 return true; |
| 294 } | 297 } |
| 295 return false; | 298 return false; |
| 296 } | 299 } |
| OLD | NEW |