Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(337)

Unified Diff: lib/src/compiler/js_names.dart

Issue 1879373004: Implement modular compilation (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 8 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/compiler/js_metalet.dart ('k') | lib/src/compiler/js_typeref_codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
-}
« no previous file with comments | « lib/src/compiler/js_metalet.dart ('k') | lib/src/compiler/js_typeref_codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698