| 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 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1769 | 1769 |
| 1770 | 1770 |
| 1771 Range* HDiv::InferRange(Zone* zone) { | 1771 Range* HDiv::InferRange(Zone* zone) { |
| 1772 if (representation().IsInteger32()) { | 1772 if (representation().IsInteger32()) { |
| 1773 Range* a = left()->range(); | 1773 Range* a = left()->range(); |
| 1774 Range* b = right()->range(); | 1774 Range* b = right()->range(); |
| 1775 Range* result = new(zone) Range(); | 1775 Range* result = new(zone) Range(); |
| 1776 result->set_can_be_minus_zero(!CheckFlag(kAllUsesTruncatingToInt32) && | 1776 result->set_can_be_minus_zero(!CheckFlag(kAllUsesTruncatingToInt32) && |
| 1777 (a->CanBeMinusZero() || | 1777 (a->CanBeMinusZero() || |
| 1778 (a->CanBeZero() && b->CanBeNegative()))); | 1778 (a->CanBeZero() && b->CanBeNegative()))); |
| 1779 if (!a->Includes(kMinInt) || | 1779 if (!a->Includes(kMinInt) || !b->Includes(-1)) { |
| 1780 !b->Includes(-1) || | |
| 1781 CheckFlag(kAllUsesTruncatingToInt32)) { | |
| 1782 // It is safe to clear kCanOverflow when kAllUsesTruncatingToInt32. | |
| 1783 ClearFlag(HValue::kCanOverflow); | 1780 ClearFlag(HValue::kCanOverflow); |
| 1784 } | 1781 } |
| 1785 | 1782 |
| 1786 if (!b->CanBeZero()) { | 1783 if (!b->CanBeZero()) { |
| 1787 ClearFlag(HValue::kCanBeDivByZero); | 1784 ClearFlag(HValue::kCanBeDivByZero); |
| 1788 } | 1785 } |
| 1789 return result; | 1786 return result; |
| 1790 } else { | 1787 } else { |
| 1791 return HValue::InferRange(zone); | 1788 return HValue::InferRange(zone); |
| 1792 } | 1789 } |
| (...skipping 2632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4425 break; | 4422 break; |
| 4426 case kExternalMemory: | 4423 case kExternalMemory: |
| 4427 stream->Add("[external-memory]"); | 4424 stream->Add("[external-memory]"); |
| 4428 break; | 4425 break; |
| 4429 } | 4426 } |
| 4430 | 4427 |
| 4431 stream->Add("@%d", offset()); | 4428 stream->Add("@%d", offset()); |
| 4432 } | 4429 } |
| 4433 | 4430 |
| 4434 } } // namespace v8::internal | 4431 } } // namespace v8::internal |
| OLD | NEW |