| 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 1571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1582 (to().IsSmi() || | 1582 (to().IsSmi() || |
| 1583 (to().IsTagged() && | 1583 (to().IsTagged() && |
| 1584 input_range != NULL && | 1584 input_range != NULL && |
| 1585 input_range->IsInSmiRange()))) { | 1585 input_range->IsInSmiRange()))) { |
| 1586 set_type(HType::Smi()); | 1586 set_type(HType::Smi()); |
| 1587 ClearGVNFlag(kChangesNewSpacePromotion); | 1587 ClearGVNFlag(kChangesNewSpacePromotion); |
| 1588 } | 1588 } |
| 1589 Range* result = (input_range != NULL) | 1589 Range* result = (input_range != NULL) |
| 1590 ? input_range->Copy(zone) | 1590 ? input_range->Copy(zone) |
| 1591 : HValue::InferRange(zone); | 1591 : HValue::InferRange(zone); |
| 1592 result->set_can_be_minus_zero(!to().IsSmiOrInteger32() || | 1592 |
| 1593 !(CheckFlag(kAllUsesTruncatingToInt32) || | 1593 if (from().IsSmiOrInteger32() || |
| 1594 CheckFlag(kAllUsesTruncatingToSmi))); | 1594 (from().IsTagged() && to().IsSmi())) { |
| 1595 // Smi/Integer32 can not be minus zero. TaggedToSmi will deopt for non-SMI. |
| 1596 result->set_can_be_minus_zero(false); |
| 1597 } else { |
| 1598 result->set_can_be_minus_zero(!to().IsSmiOrInteger32() || |
| 1599 !(CheckFlag(kAllUsesTruncatingToInt32) || |
| 1600 CheckFlag(kAllUsesTruncatingToSmi))); |
| 1601 } |
| 1595 if (to().IsSmi()) result->ClampToSmi(); | 1602 if (to().IsSmi()) result->ClampToSmi(); |
| 1596 return result; | 1603 return result; |
| 1597 } | 1604 } |
| 1598 | 1605 |
| 1599 | 1606 |
| 1600 Range* HConstant::InferRange(Zone* zone) { | 1607 Range* HConstant::InferRange(Zone* zone) { |
| 1601 if (has_int32_value_) { | 1608 if (has_int32_value_) { |
| 1602 Range* result = new(zone) Range(int32_value_, int32_value_); | 1609 Range* result = new(zone) Range(int32_value_, int32_value_); |
| 1603 result->set_can_be_minus_zero(false); | 1610 result->set_can_be_minus_zero(false); |
| 1604 return result; | 1611 return result; |
| (...skipping 2739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4344 break; | 4351 break; |
| 4345 case kExternalMemory: | 4352 case kExternalMemory: |
| 4346 stream->Add("[external-memory]"); | 4353 stream->Add("[external-memory]"); |
| 4347 break; | 4354 break; |
| 4348 } | 4355 } |
| 4349 | 4356 |
| 4350 stream->Add("@%d", offset()); | 4357 stream->Add("@%d", offset()); |
| 4351 } | 4358 } |
| 4352 | 4359 |
| 4353 } } // namespace v8::internal | 4360 } } // namespace v8::internal |
| OLD | NEW |