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

Unified Diff: src/utils.h

Issue 155350: Changed hash table to use more of the hash value when probing. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 5 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
« src/objects.cc ('K') | « src/objects.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
===================================================================
--- src/utils.h (revision 2481)
+++ src/utils.h (working copy)
@@ -212,6 +212,21 @@
// ----------------------------------------------------------------------------
+// Bitwise rotate word
+
+inline uint32_t RotateRight(uint32_t value, uint32_t n) {
+ ASSERT(n < 31);
+ return (value >> n) | (value << (32-n));
+}
+
+
+inline uint32_t RotateLeft(uint32_t value, uint32_t n) {
+ ASSERT(n < 31);
+ return (value << n) | (value >> (32-n));
+}
+
+
+// ----------------------------------------------------------------------------
// I/O support.
// Our version of printf(). Avoids compilation errors that we get
« src/objects.cc ('K') | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698