Index: lib/src/compiler/js_names.dart |
diff --git a/lib/src/codegen/js_names.dart b/lib/src/compiler/js_names.dart |
similarity index 95% |
rename from lib/src/codegen/js_names.dart |
rename to lib/src/compiler/js_names.dart |
index 867d85b0e89bd769a0e6b8348ba11a175f6258fa..5cf311df204a3c508dd9d0d662c6da8c476c381b 100644 |
--- a/lib/src/codegen/js_names.dart |
+++ b/lib/src/compiler/js_names.dart |
@@ -4,14 +4,12 @@ |
import 'dart:collection'; |
-import '../js/js_ast.dart'; |
-import 'package:dev_compiler/src/options.dart'; |
+import '../js_ast/js_ast.dart'; |
/// Unique instance for temporary variables. Will be renamed consistently |
/// across the entire file. Different instances will be named differently |
/// even if they have the same name, this makes it safe to use in code |
-/// generation without needing global knowledge. See [JSNamer]. |
-/// |
+/// generation without needing global knowledge. See [TemporaryNamer]. |
// TODO(jmesserly): move into js_ast? add a boolean to Identifier? |
class TemporaryId extends Identifier { |
TemporaryId(String name) : super(name); |
@@ -295,9 +293,3 @@ bool invalidStaticFieldName(String name) { |
} |
return false; |
} |
- |
-/// We cannot destructure named params that clash with JS reserved names: |
-/// see discussion in https://github.com/dart-lang/dev_compiler/issues/392. |
-bool canDestructureNamedParams(Iterable<String> names, CodegenOptions options) { |
- return options.destructureNamedParams && !names.any(invalidVariableName); |
-} |