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

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

Issue 191293013: Cleanup some of the range uses in ModI/DivI. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE 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/arm/lithium-codegen-arm.cc ('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 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 GVNFlagSet ObservableChangesFlags() const { 848 GVNFlagSet ObservableChangesFlags() const {
849 GVNFlagSet result = ChangesFlags(); 849 GVNFlagSet result = ChangesFlags();
850 result.Intersect(AllObservableSideEffectsFlagSet()); 850 result.Intersect(AllObservableSideEffectsFlagSet());
851 return result; 851 return result;
852 } 852 }
853 853
854 Range* range() const { return range_; } 854 Range* range() const { return range_; }
855 // TODO(svenpanne) We should really use the null object pattern here. 855 // TODO(svenpanne) We should really use the null object pattern here.
856 bool HasRange() const { return range_ != NULL; } 856 bool HasRange() const { return range_ != NULL; }
857 bool CanBeNegative() const { return !HasRange() || range()->CanBeNegative(); } 857 bool CanBeNegative() const { return !HasRange() || range()->CanBeNegative(); }
858 bool CanBeZero() const { return !HasRange() || range()->CanBeZero(); }
859 bool RangeCanInclude(int value) const { 858 bool RangeCanInclude(int value) const {
860 return !HasRange() || range()->Includes(value); 859 return !HasRange() || range()->Includes(value);
861 } 860 }
862 void AddNewRange(Range* r, Zone* zone); 861 void AddNewRange(Range* r, Zone* zone);
863 void RemoveLastAddedRange(); 862 void RemoveLastAddedRange();
864 void ComputeInitialRange(Zone* zone); 863 void ComputeInitialRange(Zone* zone);
865 864
866 // Escape analysis helpers. 865 // Escape analysis helpers.
867 virtual bool HasEscapingOperandAt(int index) { return true; } 866 virtual bool HasEscapingOperandAt(int index) { return true; }
868 virtual bool HasOutOfBoundsAccess(int size) { return false; } 867 virtual bool HasOutOfBoundsAccess(int size) { return false; }
(...skipping 6649 matching lines...) Expand 10 before | Expand all | Expand 10 after
7518 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7517 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7519 }; 7518 };
7520 7519
7521 7520
7522 #undef DECLARE_INSTRUCTION 7521 #undef DECLARE_INSTRUCTION
7523 #undef DECLARE_CONCRETE_INSTRUCTION 7522 #undef DECLARE_CONCRETE_INSTRUCTION
7524 7523
7525 } } // namespace v8::internal 7524 } } // namespace v8::internal
7526 7525
7527 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7526 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698