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

Unified Diff: compiler/java/com/google/dart/compiler/ast/DartStringLiteral.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/DartStringLiteral.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartStringLiteral.java b/compiler/java/com/google/dart/compiler/ast/DartStringLiteral.java
index e2a83bfc6096139fc23767d9088b510aa584d26b..9aacf4e415039bf8188a153a1abf331cb4902e14 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartStringLiteral.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartStringLiteral.java
@@ -6,6 +6,7 @@ package com.google.dart.compiler.ast;
import com.google.common.collect.ImmutableList;
import com.google.dart.compiler.resolver.Element;
+import com.google.dart.compiler.util.StringInterner;
import java.util.List;
@@ -28,7 +29,7 @@ public class DartStringLiteral extends DartLiteral {
private final List<DartStringLiteral> parts;
private DartStringLiteral(String value, List<DartStringLiteral> parts) {
- this.value = value;
+ this.value = StringInterner.intern(value);
this.parts = parts;
}

Powered by Google App Engine
This is Rietveld 408576698