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 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1676 void HInstanceOf::PrintDataTo(StringStream* stream) { | 1676 void HInstanceOf::PrintDataTo(StringStream* stream) { |
1677 left()->PrintNameTo(stream); | 1677 left()->PrintNameTo(stream); |
1678 stream->Add(" "); | 1678 stream->Add(" "); |
1679 right()->PrintNameTo(stream); | 1679 right()->PrintNameTo(stream); |
1680 stream->Add(" "); | 1680 stream->Add(" "); |
1681 context()->PrintNameTo(stream); | 1681 context()->PrintNameTo(stream); |
1682 } | 1682 } |
1683 | 1683 |
1684 | 1684 |
1685 Range* HValue::InferRange(Zone* zone) { | 1685 Range* HValue::InferRange(Zone* zone) { |
1686 // Untagged integer32 cannot be -0, all other representations can. | 1686 Range* result; |
1687 Range* result = new(zone) Range(); | 1687 if (type().IsSmi()) { |
1688 result->set_can_be_minus_zero(!representation().IsInteger32()); | 1688 result = new(zone) Range(Smi::kMinValue, Smi::kMaxValue); |
| 1689 result->set_can_be_minus_zero(false); |
| 1690 } else { |
| 1691 // Untagged integer32 cannot be -0, all other representations can. |
| 1692 result = new(zone) Range(); |
| 1693 result->set_can_be_minus_zero(!representation().IsInteger32()); |
| 1694 } |
1689 return result; | 1695 return result; |
1690 } | 1696 } |
1691 | 1697 |
1692 | 1698 |
1693 Range* HChange::InferRange(Zone* zone) { | 1699 Range* HChange::InferRange(Zone* zone) { |
1694 Range* input_range = value()->range(); | 1700 Range* input_range = value()->range(); |
1695 if (from().IsInteger32() && | 1701 if (from().IsInteger32() && |
1696 to().IsTagged() && | 1702 to().IsTagged() && |
1697 !value()->CheckFlag(HInstruction::kUint32) && | 1703 !value()->CheckFlag(HInstruction::kUint32) && |
1698 input_range != NULL && input_range->IsInSmiRange()) { | 1704 input_range != NULL && input_range->IsInSmiRange()) { |
(...skipping 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3591 | 3597 |
3592 | 3598 |
3593 void HCheckFunction::Verify() { | 3599 void HCheckFunction::Verify() { |
3594 HInstruction::Verify(); | 3600 HInstruction::Verify(); |
3595 ASSERT(HasNoUses()); | 3601 ASSERT(HasNoUses()); |
3596 } | 3602 } |
3597 | 3603 |
3598 #endif | 3604 #endif |
3599 | 3605 |
3600 } } // namespace v8::internal | 3606 } } // namespace v8::internal |
OLD | NEW |