| 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 1713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1724 HChange(HValue* value, | 1724 HChange(HValue* value, |
| 1725 Representation to, | 1725 Representation to, |
| 1726 bool is_truncating_to_smi, | 1726 bool is_truncating_to_smi, |
| 1727 bool is_truncating_to_int32) | 1727 bool is_truncating_to_int32) |
| 1728 : HUnaryOperation(value) { | 1728 : HUnaryOperation(value) { |
| 1729 ASSERT(!value->representation().IsNone()); | 1729 ASSERT(!value->representation().IsNone()); |
| 1730 ASSERT(!to.IsNone()); | 1730 ASSERT(!to.IsNone()); |
| 1731 ASSERT(!value->representation().Equals(to)); | 1731 ASSERT(!value->representation().Equals(to)); |
| 1732 set_representation(to); | 1732 set_representation(to); |
| 1733 SetFlag(kUseGVN); | 1733 SetFlag(kUseGVN); |
| 1734 SetFlag(kCanOverflow); |
| 1734 if (is_truncating_to_smi) { | 1735 if (is_truncating_to_smi) { |
| 1735 SetFlag(kTruncatingToSmi); | 1736 SetFlag(kTruncatingToSmi); |
| 1736 SetFlag(kTruncatingToInt32); | 1737 SetFlag(kTruncatingToInt32); |
| 1737 } | 1738 } |
| 1738 if (is_truncating_to_int32) SetFlag(kTruncatingToInt32); | 1739 if (is_truncating_to_int32) SetFlag(kTruncatingToInt32); |
| 1739 if (value->representation().IsSmi() || value->type().IsSmi()) { | 1740 if (value->representation().IsSmi() || value->type().IsSmi()) { |
| 1740 set_type(HType::Smi()); | 1741 set_type(HType::Smi()); |
| 1741 } else { | 1742 } else { |
| 1742 set_type(HType::TaggedNumber()); | 1743 set_type(HType::TaggedNumber()); |
| 1743 if (to.IsTagged()) SetChangesFlag(kNewSpacePromotion); | 1744 if (to.IsTagged()) SetChangesFlag(kNewSpacePromotion); |
| (...skipping 5773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7517 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7518 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
| 7518 }; | 7519 }; |
| 7519 | 7520 |
| 7520 | 7521 |
| 7521 #undef DECLARE_INSTRUCTION | 7522 #undef DECLARE_INSTRUCTION |
| 7522 #undef DECLARE_CONCRETE_INSTRUCTION | 7523 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7523 | 7524 |
| 7524 } } // namespace v8::internal | 7525 } } // namespace v8::internal |
| 7525 | 7526 |
| 7526 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7527 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |