| 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 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1666 Range* HChange::InferRange(Zone* zone) { | 1666 Range* HChange::InferRange(Zone* zone) { |
| 1667 Range* input_range = value()->range(); | 1667 Range* input_range = value()->range(); |
| 1668 if (from().IsInteger32() && !value()->CheckFlag(HInstruction::kUint32) && | 1668 if (from().IsInteger32() && !value()->CheckFlag(HInstruction::kUint32) && |
| 1669 (to().IsSmi() || | 1669 (to().IsSmi() || |
| 1670 (to().IsTagged() && | 1670 (to().IsTagged() && |
| 1671 input_range != NULL && | 1671 input_range != NULL && |
| 1672 input_range->IsInSmiRange()))) { | 1672 input_range->IsInSmiRange()))) { |
| 1673 set_type(HType::Smi()); | 1673 set_type(HType::Smi()); |
| 1674 ClearChangesFlag(kNewSpacePromotion); | 1674 ClearChangesFlag(kNewSpacePromotion); |
| 1675 } | 1675 } |
| 1676 if (to().IsSmiOrTagged() && |
| 1677 input_range != NULL && |
| 1678 input_range->IsInSmiRange() && |
| 1679 (!SmiValuesAre32Bits() || |
| 1680 !value()->CheckFlag(HValue::kUint32) || |
| 1681 input_range->upper() != kMaxInt)) { |
| 1682 // The Range class can't express upper bounds in the (kMaxInt, kMaxUint32] |
| 1683 // interval, so we treat kMaxInt as a sentinel for this entire interval. |
| 1684 ClearFlag(kCanOverflow); |
| 1685 } |
| 1676 Range* result = (input_range != NULL) | 1686 Range* result = (input_range != NULL) |
| 1677 ? input_range->Copy(zone) | 1687 ? input_range->Copy(zone) |
| 1678 : HValue::InferRange(zone); | 1688 : HValue::InferRange(zone); |
| 1679 result->set_can_be_minus_zero(!to().IsSmiOrInteger32() || | 1689 result->set_can_be_minus_zero(!to().IsSmiOrInteger32() || |
| 1680 !(CheckFlag(kAllUsesTruncatingToInt32) || | 1690 !(CheckFlag(kAllUsesTruncatingToInt32) || |
| 1681 CheckFlag(kAllUsesTruncatingToSmi))); | 1691 CheckFlag(kAllUsesTruncatingToSmi))); |
| 1682 if (to().IsSmi()) result->ClampToSmi(); | 1692 if (to().IsSmi()) result->ClampToSmi(); |
| 1683 return result; | 1693 return result; |
| 1684 } | 1694 } |
| 1685 | 1695 |
| (...skipping 2857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4543 break; | 4553 break; |
| 4544 case kExternalMemory: | 4554 case kExternalMemory: |
| 4545 stream->Add("[external-memory]"); | 4555 stream->Add("[external-memory]"); |
| 4546 break; | 4556 break; |
| 4547 } | 4557 } |
| 4548 | 4558 |
| 4549 stream->Add("@%d", offset()); | 4559 stream->Add("@%d", offset()); |
| 4550 } | 4560 } |
| 4551 | 4561 |
| 4552 } } // namespace v8::internal | 4562 } } // namespace v8::internal |
| OLD | NEW |