Chromium Code Reviews| Index: src/hydrogen-instructions.h |
| =================================================================== |
| --- src/hydrogen-instructions.h (revision 9191) |
| +++ src/hydrogen-instructions.h (working copy) |
| @@ -2249,6 +2249,16 @@ |
| bool InOldSpace() const { return !HEAP->InNewSpace(*handle_); } |
| + bool ImmortalImmovable() const { |
| + Heap* heap = HEAP; |
| + if (*handle_ == heap->undefined_value()) return true; |
| + if (*handle_ == heap->null_value()) return true; |
| + if (*handle_ == heap->true_value()) return true; |
| + if (*handle_ == heap->false_value()) return true; |
| + if (*handle_ == heap->the_hole_value()) return true; |
| + return false; |
| + } |
| + |
| virtual Representation RequiredInputRepresentation(int index) const { |
| return Representation::None(); |
| } |
| @@ -3333,7 +3343,9 @@ |
| // TODO(gc) On bleeding edge we omit write barrier when we are |
|
fschneider
2011/09/08 19:57:43
This TODO can be removed as well (or changed into
|
| // storing old space constant. We can't allow such an optimization |
| // on GC branch. |
| - return !value->type().IsSmi(); |
| + return !value->type().IsBoolean() |
| + && !value->type().IsSmi() |
| + && !(value->IsConstant() && HConstant::cast(value)->ImmortalImmovable()); |
| } |