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

Unified Diff: compiler/java/com/google/dart/compiler/ast/DartCommentRefName.java

Issue 12571002: Intern AST and Model names to reduce char[]/String waste. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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
Index: compiler/java/com/google/dart/compiler/ast/DartCommentRefName.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartCommentRefName.java b/compiler/java/com/google/dart/compiler/ast/DartCommentRefName.java
index 52c133e643f1ebaf0f136ec83d094ed5ad006027..95a1bbd6fb721ecd7a95d79561c992a579118166 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartCommentRefName.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartCommentRefName.java
@@ -5,6 +5,7 @@
package com.google.dart.compiler.ast;
import com.google.dart.compiler.resolver.Element;
+import com.google.dart.compiler.util.StringInterner;
/**
* <code>[name]</code> in {@link DartComment}.
@@ -15,7 +16,7 @@ public final class DartCommentRefName extends DartNode {
public DartCommentRefName(String name) {
assert name != null;
- this.name = name;
+ this.name = StringInterner.intern(name);
}
@Override

Powered by Google App Engine
This is Rietveld 408576698