| 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 1847 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1858     int32_t positive_bound = -(Min(NegAbs(b->lower()), NegAbs(b->upper())) + 1); | 1858     int32_t positive_bound = -(Min(NegAbs(b->lower()), NegAbs(b->upper())) + 1); | 
| 1859 | 1859 | 
| 1860     // The result of the modulo operation has the sign of its left operand. | 1860     // The result of the modulo operation has the sign of its left operand. | 
| 1861     bool left_can_be_negative = a->CanBeMinusZero() || a->CanBeNegative(); | 1861     bool left_can_be_negative = a->CanBeMinusZero() || a->CanBeNegative(); | 
| 1862     Range* result = new(zone) Range(left_can_be_negative ? -positive_bound : 0, | 1862     Range* result = new(zone) Range(left_can_be_negative ? -positive_bound : 0, | 
| 1863                                     a->CanBePositive() ? positive_bound : 0); | 1863                                     a->CanBePositive() ? positive_bound : 0); | 
| 1864 | 1864 | 
| 1865     result->set_can_be_minus_zero(!CheckFlag(kAllUsesTruncatingToInt32) && | 1865     result->set_can_be_minus_zero(!CheckFlag(kAllUsesTruncatingToInt32) && | 
| 1866                                   left_can_be_negative); | 1866                                   left_can_be_negative); | 
| 1867 | 1867 | 
|  | 1868     if (!a->CanBeNegative()) { | 
|  | 1869       ClearFlag(HValue::kLeftCanBeNegative); | 
|  | 1870     } | 
|  | 1871 | 
| 1868     if (!a->Includes(kMinInt) || !b->Includes(-1)) { | 1872     if (!a->Includes(kMinInt) || !b->Includes(-1)) { | 
| 1869       ClearFlag(HValue::kCanOverflow); | 1873       ClearFlag(HValue::kCanOverflow); | 
| 1870     } | 1874     } | 
| 1871 | 1875 | 
| 1872     if (!b->CanBeZero()) { | 1876     if (!b->CanBeZero()) { | 
| 1873       ClearFlag(HValue::kCanBeDivByZero); | 1877       ClearFlag(HValue::kCanBeDivByZero); | 
| 1874     } | 1878     } | 
| 1875     return result; | 1879     return result; | 
| 1876   } else { | 1880   } else { | 
| 1877     return HValue::InferRange(zone); | 1881     return HValue::InferRange(zone); | 
| (...skipping 2693 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4571       break; | 4575       break; | 
| 4572     case kExternalMemory: | 4576     case kExternalMemory: | 
| 4573       stream->Add("[external-memory]"); | 4577       stream->Add("[external-memory]"); | 
| 4574       break; | 4578       break; | 
| 4575   } | 4579   } | 
| 4576 | 4580 | 
| 4577   stream->Add("@%d", offset()); | 4581   stream->Add("@%d", offset()); | 
| 4578 } | 4582 } | 
| 4579 | 4583 | 
| 4580 } }  // namespace v8::internal | 4584 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|