Chromium Code Reviews| Index: src/hydrogen-instructions.h |
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
| index ad036871802b32b0ad9646e480fd43339444ce0f..a0d61add5d0f3b14f788fe42e2073e2297bb3739 100644 |
| --- a/src/hydrogen-instructions.h |
| +++ b/src/hydrogen-instructions.h |
| @@ -3196,7 +3196,8 @@ class HConstant: public HTemplateInstruction<0> { |
| } |
| if (has_double_value_) { |
| if (BitCast<int64_t>(double_value_) == BitCast<int64_t>(-0.0) || |
| - isnan(double_value_)) { |
| + isnan(double_value_) || |
| + FixedDoubleArray::is_the_hole_nan(double_value_)) { |
| return true; |
| } |
| return false; |
| @@ -3227,7 +3228,9 @@ class HConstant: public HTemplateInstruction<0> { |
| return has_int32_value_; |
| } |
| - virtual bool EmitAtUses() { return !representation().IsDouble(); } |
| + virtual bool EmitAtUses() { |
| + return !representation().IsDouble() || ImmortalImmovable(); |
|
danno
2013/04/08 12:57:27
Maybe it's better to factor our the special cases
mvstanton
2013/04/08 16:10:14
I did this kind of refactoring but more in the met
|
| + } |
| virtual void PrintDataTo(StringStream* stream); |
| virtual HType CalculateInferredType(); |
| bool IsInteger() { return handle()->IsSmi(); } |
| @@ -3246,6 +3249,10 @@ class HConstant: public HTemplateInstruction<0> { |
| ASSERT(HasDoubleValue()); |
| return double_value_; |
| } |
| + bool IsDoubleCanonicalHole() const { |
| + ASSERT(HasDoubleValue()); |
| + return FixedDoubleArray::is_the_hole_nan(double_value_); |
| + } |
| bool HasNumberValue() const { return has_double_value_; } |
| int32_t NumberValueAsInteger32() const { |
| ASSERT(HasNumberValue()); |
| @@ -5677,6 +5684,11 @@ class HStoreKeyed |
| bool IsDehoisted() { return is_dehoisted_; } |
| void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; } |
| + bool IsConstantHoleStore() { |
| + return value()->IsConstant() && |
| + HConstant::cast(value())->IsDoubleCanonicalHole(); |
|
danno
2013/04/08 12:57:27
This predicate seems misleading... it checks only
mvstanton
2013/04/08 16:10:14
Done.
|
| + } |
| + |
| virtual void SetSideEffectDominator(GVNFlag side_effect, HValue* dominator) { |
| ASSERT(side_effect == kChangesNewSpacePromotion); |
| new_space_dominator_ = dominator; |