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

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

Issue 204583002: Implement flooring division by a constant via truncating division by a constant. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 6 years, 9 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 | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-codegen-ia32.cc » ('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 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 1815 matching lines...) Expand 10 before | Expand all | Expand 10 after
1826 Range* a = left()->range(); 1826 Range* a = left()->range();
1827 Range* b = right()->range(); 1827 Range* b = right()->range();
1828 Range* result = new(zone) Range(); 1828 Range* result = new(zone) Range();
1829 result->set_can_be_minus_zero(!CheckFlag(kAllUsesTruncatingToInt32) && 1829 result->set_can_be_minus_zero(!CheckFlag(kAllUsesTruncatingToInt32) &&
1830 (a->CanBeMinusZero() || 1830 (a->CanBeMinusZero() ||
1831 (a->CanBeZero() && b->CanBeNegative()))); 1831 (a->CanBeZero() && b->CanBeNegative())));
1832 if (!a->Includes(kMinInt)) { 1832 if (!a->Includes(kMinInt)) {
1833 ClearFlag(kLeftCanBeMinInt); 1833 ClearFlag(kLeftCanBeMinInt);
1834 } 1834 }
1835 1835
1836 if (!a->CanBeNegative()) {
1837 ClearFlag(HValue::kLeftCanBeNegative);
1838 }
1839
1840 if (!a->CanBePositive()) {
1841 ClearFlag(HValue::kLeftCanBePositive);
1842 }
1843
1836 if (!a->Includes(kMinInt) || !b->Includes(-1)) { 1844 if (!a->Includes(kMinInt) || !b->Includes(-1)) {
1837 ClearFlag(kCanOverflow); 1845 ClearFlag(kCanOverflow);
1838 } 1846 }
1839 1847
1840 if (!b->CanBeZero()) { 1848 if (!b->CanBeZero()) {
1841 ClearFlag(kCanBeDivByZero); 1849 ClearFlag(kCanBeDivByZero);
1842 } 1850 }
1843 return result; 1851 return result;
1844 } else { 1852 } else {
1845 return HValue::InferRange(zone); 1853 return HValue::InferRange(zone);
(...skipping 2733 matching lines...) Expand 10 before | Expand all | Expand 10 after
4579 break; 4587 break;
4580 case kExternalMemory: 4588 case kExternalMemory:
4581 stream->Add("[external-memory]"); 4589 stream->Add("[external-memory]");
4582 break; 4590 break;
4583 } 4591 }
4584 4592
4585 stream->Add("@%d", offset()); 4593 stream->Add("@%d", offset());
4586 } 4594 }
4587 4595
4588 } } // namespace v8::internal 4596 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698