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

Unified Diff: runtime/vm/intermediate_language.h

Issue 11175013: Add range to kBIT_AND with positive constants. Use that range to eliminate compares in left shifts. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 14299)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -1691,8 +1691,8 @@
void PrintTo(BufferFormatter* f) const;
static const char* ToCString(Range* range);
- const RangeBoundary& min() { return min_; }
- const RangeBoundary& max() { return max_; }
+ const RangeBoundary& min() const { return min_; }
+ const RangeBoundary& max() const { return max_; }
bool Equals(Range* other) {
return min_.Equals(other->min_) && max_.Equals(other->max_);
@@ -1708,6 +1708,9 @@
return range->max().UpperBound();
}
+ // Inclusive.
+ bool IsWithin(intptr_t min_int, intptr_t max_int) const;
+
private:
RangeBoundary min_;
RangeBoundary max_;
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698