Chromium Code Reviews| Index: src/hydrogen.cc |
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
| index ee3d6b5cfb632effc8ac270dfdeeed222528cdf0..2d62349cff30e329fbef22c3095a34c810b2a0f5 100644 |
| --- a/src/hydrogen.cc |
| +++ b/src/hydrogen.cc |
| @@ -600,7 +600,15 @@ HConstant* HGraph::GetConstantFalse() { |
| HConstant* HGraph::GetConstantHole() { |
| - return GetConstant(&constant_hole_, isolate()->heap()->the_hole_value()); |
| + if (!constant_hole_.is_set()) { |
| + Handle<Object> hole_value = Handle<Object>( |
| + &isolate()->heap()->roots_array_start()[Heap::kTheHoleValueRootIndex]); |
|
Michael Starzinger
2012/07/02 20:11:20
Likewise.
sanjoy
2012/07/03 09:05:52
Done.
|
| + HConstant* constant = new(zone()) HConstant(hole_value, |
| + Representation::Tagged()); |
| + constant->InsertAfter(GetConstantUndefined()); |
| + constant_hole_.set(constant); |
| + } |
| + return constant_hole_.get(); |
| } |