commit | e46be819fca9468a0cd4e74859ce0f778eb8ca60 | [log] [tgz] |
---|---|---|
author | Leon Clarke <leonclarke@google.com> | Tue Jan 19 14:06:41 2010 +0000 |
committer | Leon Clarke <leonclarke@google.com> | Tue Jan 19 16:34:04 2010 +0000 |
tree | f9c37105a3367f2ad5d31fbc2cb37b84fa67b59a | |
parent | d0582a6c46733687d045e4188a1bcd0123c758a1 [diff] [blame] |
New version of v8 from bleeding edge at revision 3649
diff --git a/src/utils.cc b/src/utils.cc index 08ee16f..374385b 100644 --- a/src/utils.cc +++ b/src/utils.cc
@@ -40,6 +40,7 @@ // Implementation is from "Hacker's Delight" by Henry S. Warren, Jr., // figure 3-3, page 48, where the function is called clp2. uint32_t RoundUpToPowerOf2(uint32_t x) { + ASSERT(x <= 0x80000000u); x = x - 1; x = x | (x >> 1); x = x | (x >> 2);