Index: src/compiler/js-graph.cc |
diff --git a/src/compiler/js-graph.cc b/src/compiler/js-graph.cc |
index 9c1baa00e644f9c5d2091a1f4c7c55909dfa1ac2..594cb6445bac0ff397b0f4bc88a11a432ffac98a 100644 |
--- a/src/compiler/js-graph.cc |
+++ b/src/compiler/js-graph.cc |
@@ -72,7 +72,9 @@ Node* JSGraph::NaNConstant() { |
Node* JSGraph::HeapConstant(Handle<HeapObject> value) { |
- // TODO(bmeurer): Flatten cons strings here before we canonicalize them? |
+ if (value->IsConsString()) { |
Yang
2015/12/16 06:24:16
String::Flatten already checks for cons string. No
Benedikt Meurer
2015/12/16 06:26:02
That doesn't really help, since we'd have to test
|
+ value = String::Flatten(Handle<String>::cast(value), TENURED); |
+ } |
Node** loc = cache_.FindHeapConstant(value); |
if (*loc == nullptr) { |
*loc = graph()->NewNode(common()->HeapConstant(value)); |