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

Unified Diff: pkg/js_ast/lib/src/nodes.dart

Issue 1212613009: dart2js: Implement frequency based naming. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Reserve reserved names :) Created 5 years, 6 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 | « pkg/compiler/lib/src/js_emitter/program_builder.dart ('k') | pkg/js_ast/lib/src/printer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/js_ast/lib/src/nodes.dart
diff --git a/pkg/js_ast/lib/src/nodes.dart b/pkg/js_ast/lib/src/nodes.dart
index 33b5c58431e6bbe5512a9d1bbb3edfa2a38bb6af..95c8819f1c88e971b501c6685c347c74398fdfba 100644
--- a/pkg/js_ast/lib/src/nodes.dart
+++ b/pkg/js_ast/lib/src/nodes.dart
@@ -588,6 +588,12 @@ abstract class Name extends Literal
implements Declaration, Parameter, Comparable {
accept(NodeVisitor visitor) => visitor.visitName(this);
+ /// Returns a unique [key] for this name.
+ ///
+ /// The key is unrelated to the actual name and is not intended for human
+ /// consumption. As such, it might be long or cryptic.
+ String get key;
+
bool get allowRename => false;
}
@@ -597,6 +603,10 @@ class LiteralStringFromName extends LiteralString {
LiteralStringFromName(this.name) : super(null);
String get value => '"${name.name}"';
+
+ void visitChildren(NodeVisitor visitor) {
+ name.accept(visitor);
+ }
}
class LiteralExpression extends Expression {
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/program_builder.dart ('k') | pkg/js_ast/lib/src/printer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698