Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(926)

Side by Side Diff: src/hydrogen-instructions.cc

Issue 7566040: Revert "tighten invariants of HValue::InferRange" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/math-floor.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 // Untagged integer32 cannot be -0, all other representations can. 865 if (representation().IsTagged()) {
866 Range* result = new Range(); 866 // Tagged values are always in int32 range when converted to integer,
867 result->set_can_be_minus_zero(!representation().IsInteger32()); 867 // but they can contain -0.
868 return result; 868 Range* result = new Range();
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 }
869 } 878 }
870 879
871 880
872 Range* HConstant::InferRange() { 881 Range* HConstant::InferRange() {
873 if (has_int32_value_) { 882 if (has_int32_value_) {
874 Range* result = new Range(int32_value_, int32_value_); 883 Range* result = new Range(int32_value_, int32_value_);
875 result->set_can_be_minus_zero(false); 884 result->set_can_be_minus_zero(false);
876 return result; 885 return result;
877 } 886 }
878 return HValue::InferRange(); 887 return HValue::InferRange();
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after
1832 1841
1833 1842
1834 void HCheckPrototypeMaps::Verify() { 1843 void HCheckPrototypeMaps::Verify() {
1835 HInstruction::Verify(); 1844 HInstruction::Verify();
1836 ASSERT(HasNoUses()); 1845 ASSERT(HasNoUses());
1837 } 1846 }
1838 1847
1839 #endif 1848 #endif
1840 1849
1841 } } // namespace v8::internal 1850 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/math-floor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698