OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1700 matching lines...) Loading... |
1711 HChange(HValue* value, | 1711 HChange(HValue* value, |
1712 Representation to, | 1712 Representation to, |
1713 bool is_truncating, | 1713 bool is_truncating, |
1714 bool deoptimize_on_undefined) | 1714 bool deoptimize_on_undefined) |
1715 : HUnaryOperation(value) { | 1715 : HUnaryOperation(value) { |
1716 ASSERT(!value->representation().IsNone()); | 1716 ASSERT(!value->representation().IsNone()); |
1717 ASSERT(!to.IsNone()); | 1717 ASSERT(!to.IsNone()); |
1718 ASSERT(!value->representation().Equals(to)); | 1718 ASSERT(!value->representation().Equals(to)); |
1719 set_representation(to); | 1719 set_representation(to); |
1720 SetFlag(kUseGVN); | 1720 SetFlag(kUseGVN); |
1721 if (deoptimize_on_undefined) SetFlag(kDeoptimizeOnUndefined); | 1721 if (deoptimize_on_undefined || to.IsTagged()) { |
| 1722 SetFlag(kDeoptimizeOnUndefined); |
| 1723 } |
1722 if (is_truncating) SetFlag(kTruncatingToInt32); | 1724 if (is_truncating) SetFlag(kTruncatingToInt32); |
1723 if (value->representation().IsSmi() || value->type().IsSmi()) { | 1725 if (value->representation().IsSmi() || value->type().IsSmi()) { |
1724 set_type(HType::Smi()); | 1726 set_type(HType::Smi()); |
1725 } else { | 1727 } else { |
1726 set_type(HType::TaggedNumber()); | 1728 set_type(HType::TaggedNumber()); |
1727 if (to.IsTagged()) SetGVNFlag(kChangesNewSpacePromotion); | 1729 if (to.IsTagged()) SetGVNFlag(kChangesNewSpacePromotion); |
1728 } | 1730 } |
1729 } | 1731 } |
1730 | 1732 |
1731 virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); | 1733 virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); |
(...skipping 4767 matching lines...) Loading... |
6499 virtual bool IsDeletable() const { return true; } | 6501 virtual bool IsDeletable() const { return true; } |
6500 }; | 6502 }; |
6501 | 6503 |
6502 | 6504 |
6503 #undef DECLARE_INSTRUCTION | 6505 #undef DECLARE_INSTRUCTION |
6504 #undef DECLARE_CONCRETE_INSTRUCTION | 6506 #undef DECLARE_CONCRETE_INSTRUCTION |
6505 | 6507 |
6506 } } // namespace v8::internal | 6508 } } // namespace v8::internal |
6507 | 6509 |
6508 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6510 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |