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

Unified Diff: src/utils.h

Issue 15952004: Improve range analysis for modulo operations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added comment. Better parentheses. Removed wrong intersection. Created 7 years, 7 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 | « src/hydrogen-instructions.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils.h
diff --git a/src/utils.h b/src/utils.h
index 93cded18bcd2f9c07dc9c29ec567bbc565bb3520..b16730b8c46d750c1e264ad07713868c2b32d804 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -232,6 +232,13 @@ T Min(T a, T b) {
}
+// Returns the negative absolute value of its argument.
+template <typename T>
+T NegAbs(T a) {
+ return a < 0 ? a : -a;
+}
+
+
inline int StrLength(const char* string) {
size_t length = strlen(string);
ASSERT(length == static_cast<size_t>(static_cast<int>(length)));
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698