| Index: src/compiler/change-lowering.cc
|
| diff --git a/src/compiler/change-lowering.cc b/src/compiler/change-lowering.cc
|
| index 3f8e45b9e71d70b63cde34c37b986999486ab000..8f3be185935aa0953c9f4de2d6511de36840b8a1 100644
|
| --- a/src/compiler/change-lowering.cc
|
| +++ b/src/compiler/change-lowering.cc
|
| @@ -34,8 +34,11 @@ Node* ChangeLoweringBase::ExternalConstant(ExternalReference reference) {
|
|
|
|
|
| Node* ChangeLoweringBase::HeapConstant(PrintableUnique<HeapObject> value) {
|
| - // TODO(bmeurer): Use common node cache.
|
| - return graph()->NewNode(common()->HeapConstant(value));
|
| + Node** loc = cache()->FindHeapConstant(value);
|
| + if (*loc == NULL) {
|
| + *loc = graph()->NewNode(common()->HeapConstant(value));
|
| + }
|
| + return *loc;
|
| }
|
|
|
|
|
|
|