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

Unified Diff: compiler/java/com/google/dart/compiler/ast/DartCommentNewName.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
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/ast/DartCommentRefName.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/ast/DartCommentNewName.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartCommentNewName.java b/compiler/java/com/google/dart/compiler/ast/DartCommentNewName.java
index 1ab676f49cebb630fae40c8a0fdcc63a864e261c..e1ef173329fbc5fdd8cb01dcf6b1ebf2122ccffc 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartCommentNewName.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartCommentNewName.java
@@ -6,6 +6,7 @@ package com.google.dart.compiler.ast;
import com.google.dart.compiler.resolver.ClassElement;
import com.google.dart.compiler.resolver.ConstructorElement;
+import com.google.dart.compiler.util.StringInterner;
/**
* <code>[new Class.name]</code> in {@link DartComment}.
@@ -22,9 +23,9 @@ public final class DartCommentNewName extends DartNode {
int constructorOffset) {
assert className != null;
assert constructorName != null;
- this.className = className;
+ this.className = StringInterner.intern(className);
this.classOffset = classOffset;
- this.constructorName = constructorName;
+ this.constructorName = StringInterner.intern(constructorName);
this.constructorOffset = constructorOffset;
}
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/ast/DartCommentRefName.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698