| 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 1739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1750 class HChange: public HUnaryOperation { | 1750 class HChange: public HUnaryOperation { |
| 1751 public: | 1751 public: |
| 1752 HChange(HValue* value, | 1752 HChange(HValue* value, |
| 1753 Representation to, | 1753 Representation to, |
| 1754 bool is_truncating, | 1754 bool is_truncating, |
| 1755 bool deoptimize_on_undefined) | 1755 bool deoptimize_on_undefined) |
| 1756 : HUnaryOperation(value) { | 1756 : HUnaryOperation(value) { |
| 1757 ASSERT(!value->representation().IsNone() && !to.IsNone()); | 1757 ASSERT(!value->representation().IsNone() && !to.IsNone()); |
| 1758 ASSERT(!value->representation().Equals(to)); | 1758 ASSERT(!value->representation().Equals(to)); |
| 1759 set_representation(to); | 1759 set_representation(to); |
| 1760 set_type(HType::TaggedNumber()); | |
| 1761 SetFlag(kUseGVN); | 1760 SetFlag(kUseGVN); |
| 1762 if (deoptimize_on_undefined) SetFlag(kDeoptimizeOnUndefined); | 1761 if (deoptimize_on_undefined) SetFlag(kDeoptimizeOnUndefined); |
| 1763 if (is_truncating) SetFlag(kTruncatingToInt32); | 1762 if (is_truncating) SetFlag(kTruncatingToInt32); |
| 1764 if (to.IsTagged()) SetGVNFlag(kChangesNewSpacePromotion); | 1763 if (value->type().IsSmi()) { |
| 1764 set_type(HType::Smi()); |
| 1765 } else { |
| 1766 set_type(HType::TaggedNumber()); |
| 1767 if (to.IsTagged()) SetGVNFlag(kChangesNewSpacePromotion); |
| 1768 } |
| 1765 } | 1769 } |
| 1766 | 1770 |
| 1767 virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); | 1771 virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); |
| 1768 virtual HType CalculateInferredType(); | 1772 virtual HType CalculateInferredType(); |
| 1769 virtual HValue* Canonicalize(); | 1773 virtual HValue* Canonicalize(); |
| 1770 | 1774 |
| 1771 Representation from() const { return value()->representation(); } | 1775 Representation from() const { return value()->representation(); } |
| 1772 Representation to() const { return representation(); } | 1776 Representation to() const { return representation(); } |
| 1773 bool deoptimize_on_undefined() const { | 1777 bool deoptimize_on_undefined() const { |
| 1774 return CheckFlag(kDeoptimizeOnUndefined); | 1778 return CheckFlag(kDeoptimizeOnUndefined); |
| (...skipping 4716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6491 virtual bool IsDeletable() const { return true; } | 6495 virtual bool IsDeletable() const { return true; } |
| 6492 }; | 6496 }; |
| 6493 | 6497 |
| 6494 | 6498 |
| 6495 #undef DECLARE_INSTRUCTION | 6499 #undef DECLARE_INSTRUCTION |
| 6496 #undef DECLARE_CONCRETE_INSTRUCTION | 6500 #undef DECLARE_CONCRETE_INSTRUCTION |
| 6497 | 6501 |
| 6498 } } // namespace v8::internal | 6502 } } // namespace v8::internal |
| 6499 | 6503 |
| 6500 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6504 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |