OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 void HInstanceOf::PrintDataTo(StringStream* stream) { | 855 void HInstanceOf::PrintDataTo(StringStream* stream) { |
856 left()->PrintNameTo(stream); | 856 left()->PrintNameTo(stream); |
857 stream->Add(" "); | 857 stream->Add(" "); |
858 right()->PrintNameTo(stream); | 858 right()->PrintNameTo(stream); |
859 stream->Add(" "); | 859 stream->Add(" "); |
860 context()->PrintNameTo(stream); | 860 context()->PrintNameTo(stream); |
861 } | 861 } |
862 | 862 |
863 | 863 |
864 Range* HValue::InferRange() { | 864 Range* HValue::InferRange() { |
865 if (representation().IsTagged()) { | 865 // Untagged integer32 cannot be -0, all other representations can. |
866 // Tagged values are always in int32 range when converted to integer, | 866 Range* result = new Range(); |
867 // but they can contain -0. | 867 result->set_can_be_minus_zero(!representation().IsInteger32()); |
868 Range* result = new Range(); | 868 return result; |
869 result->set_can_be_minus_zero(true); | |
870 return result; | |
871 } else if (representation().IsNone()) { | |
872 return NULL; | |
873 } else { | |
874 // Untagged integer32 cannot be -0 and we don't compute ranges for | |
875 // untagged doubles. | |
876 return new Range(); | |
877 } | |
878 } | 869 } |
879 | 870 |
880 | 871 |
881 Range* HConstant::InferRange() { | 872 Range* HConstant::InferRange() { |
882 if (has_int32_value_) { | 873 if (has_int32_value_) { |
883 Range* result = new Range(int32_value_, int32_value_); | 874 Range* result = new Range(int32_value_, int32_value_); |
884 result->set_can_be_minus_zero(false); | 875 result->set_can_be_minus_zero(false); |
885 return result; | 876 return result; |
886 } | 877 } |
887 return HValue::InferRange(); | 878 return HValue::InferRange(); |
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1841 | 1832 |
1842 | 1833 |
1843 void HCheckPrototypeMaps::Verify() { | 1834 void HCheckPrototypeMaps::Verify() { |
1844 HInstruction::Verify(); | 1835 HInstruction::Verify(); |
1845 ASSERT(HasNoUses()); | 1836 ASSERT(HasNoUses()); |
1846 } | 1837 } |
1847 | 1838 |
1848 #endif | 1839 #endif |
1849 | 1840 |
1850 } } // namespace v8::internal | 1841 } } // namespace v8::internal |
OLD | NEW |